name: decision-visualization description: 用于创建清晰、可操作的决策分析可视化表示的专项技能 allowed-tools:
- Read
- Write
- Glob
- Grep
- Bash
metadata:
specialization: 决策智能
domain: 商业
category: 可视化
priority: high
tools-libraries:
- plotly
- bokeh
- matplotlib
- d3.js
决策可视化
概述
决策可视化技能提供专门的可视化能力,用于决策支持,创建清晰、可操作的可视化表示,有效地将分析结果传达给决策者和利益相关者。
能力
- 决策树图
- 策略表和结果矩阵
- 权衡散点图
- 信息价值图
- 置信度/不确定性带
- 敏感性瀑布图
- 多准则决策分析热图
- 交互式仪表板
使用流程
- 高管仪表板开发
- 结构化决策流程
- 多准则决策分析 (MCDA)
- 决策文档与学习
用法
决策树可视化
# 决策树图配置
decision_tree_viz = {
"type": "decision_tree",
"data": decision_tree_structure,
"options": {
"node_shapes": {
"decision": "square",
"chance": "circle",
"terminal": "triangle"
},
"show_probabilities": True,
"show_payoffs": True,
"highlight_optimal_path": True,
"color_scheme": "sequential",
"orientation": "horizontal"
}
}
策略表
# 策略比较表
strategy_table = {
"type": "strategy_table",
"alternatives": ["策略A", "策略B", "策略C"],
"criteria": ["成本", "时间", "质量", "风险"],
"data": performance_matrix,
"options": {
"color_coding": "performance_based",
"show_weights": True,
"show_scores": True,
"highlight_winner": True
}
}
权衡散点图
# 多目标权衡可视化
tradeoff_plot = {
"type": "scatter",
"data": alternatives_data,
"x_axis": {"variable": "cost", "label": "总成本 ($)"},
"y_axis": {"variable": "benefit", "label": "预期收益"},
"options": {
"show_pareto_frontier": True,
"label_alternatives": True,
"size_by": "probability",
"color_by": "risk_category",
"show_dominated_region": True
}
}
龙卷风图
# 敏感性龙卷风图
tornado = {
"type": "tornado",
"base_value": 1000000,
"sensitivities": {
"价格": {"low": 800000, "high": 1300000},
"销量": {"low": 900000, "high": 1150000},
"成本": {"low": 950000, "high": 1100000},
"市场份额": {"low": 850000, "high": 1200000}
},
"options": {
"sort_by": "swing",
"show_base_line": True,
"color_scheme": ["red", "green"],
"show_values": True
}
}
不确定性可视化
# 分布与置信度可视化
uncertainty_viz = {
"type": "distribution",
"data": simulation_results,
"options": {
"show_histogram": True,
"show_density": True,
"show_percentiles": [5, 25, 50, 75, 95],
"show_mean": True,
"confidence_band": 0.90,
"highlight_threshold": 0 # 例如,盈亏平衡点
}
}
可视化类型
| 类型 | 使用场景 | 关键特性 |
|---|---|---|
| 决策树 | 结构可视化 | 节点、分支、收益 |
| 策略表 | 方案比较 | 颜色编码的性能 |
| 龙卷风图 | 敏感性排序 | 水平条形图、波动幅度 |
| 蜘蛛/雷达图 | 多准则轮廓 | 多边形叠加 |
| 热图 | 矩阵数据 | 颜色强度 |
| 瀑布图 | 价值分解 | 顺序条形图 |
| 散点图 | 权衡分析 | 点、帕累托前沿 |
| 箱线图 | 不确定性 | 四分位数、异常值 |
| 扇形图 | 预测不确定性 | 渐宽的置信带 |
输入模式
{
"visualization_type": "string",
"data": "object",
"axes": {
"x": {"variable": "string", "label": "string"},
"y": {"variable": "string", "label": "string"}
},
"options": {
"title": "string",
"color_scheme": "string",
"interactive": "boolean",
"annotations": ["object"],
"export_format": "png|svg|pdf|html"
}
}
输出模式
{
"visualization_path": "string",
"interactive_url": "string (如果适用)",
"metadata": {
"type": "string",
"dimensions": {"width": "number", "height": "number"},
"data_summary": "object"
},
"accessibility": {
"alt_text": "string",
"data_table": "object"
}
}
设计原则
- 清晰性:去除图表垃圾,最大化数据墨水比
- 准确性:无失真,使用适当的比例尺
- 高效性:快速理解,关键洞察突出
- 可操作性:决策含义清晰
- 可访问性:色盲友好,提供替代文本
最佳实践
- 根据数据和信息选择合适的可视化类型
- 在相关图表中使用一致的颜色方案
- 包含清晰的标题和轴标签
- 使用注释突出关键要点
- 提供交互功能以供探索
- 导出多种格式以适应不同用途
- 包含数据表以提高可访问性
集成点
- 接收所有分析技能的数据
- 为数据叙事提供输入
- 支持高管仪表板开发
- 与决策日志连接以进行文档记录