f8b21af4be
10_Wiki/Topics 대규모 정리: - 오류 캡처/미완성 stub 문서 227개 제거 - 교차폴더 중복 43클러스터 병합 (63파일 → redirect) - 링크명 정규화: 깨진 링크 수정·redirect 직결·개념 매핑 ~2,400건 - 카테고리 MOC 6개 신규 생성 - Graph 섹션 미해결 related-keyword 링크 10,058건 제거 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
154 lines
5.3 KiB
Markdown
154 lines
5.3 KiB
Markdown
---
|
||
id: wiki-2026-0508-의사결정-매트릭스-decision-matrix
|
||
title: 의사결정 매트릭스 (Decision Matrix)
|
||
category: 10_Wiki/Topics
|
||
status: verified
|
||
canonical_id: self
|
||
aliases: [Decision Matrix, Pugh Matrix, Weighted Decision Matrix]
|
||
duplicate_of: none
|
||
source_trust_level: A
|
||
confidence_score: 0.9
|
||
verification_status: applied
|
||
tags: [architecture, decision-making, adr, evaluation]
|
||
raw_sources: []
|
||
last_reinforced: 2026-05-10
|
||
github_commit: pending
|
||
tech_stack:
|
||
language: python
|
||
framework: pandas
|
||
---
|
||
|
||
# 의사결정 매트릭스 (Decision Matrix)
|
||
|
||
## 매 한 줄
|
||
> **"매 옵션 × 매 기준 × 매 가중치"**. 후보 alternative를 행, 평가 기준(criterion)을 열, 셀에 점수를 채우고 column별 가중치를 곱해 합산하는 정량적 비교 도구. 1980년대 Stuart Pugh의 concept selection method에서 출발해 architecture trade-off (ATAM), tool selection, vendor evaluation에 광범위 적용.
|
||
|
||
## 매 핵심
|
||
|
||
### 매 구성 요소
|
||
- **Alternatives** (행): 비교할 옵션 (e.g., PostgreSQL vs DynamoDB vs MongoDB).
|
||
- **Criteria** (열): 평가 축 (latency, cost, team familiarity, ops burden, ...).
|
||
- **Weights**: 각 criterion의 중요도 (보통 1-5 또는 합 1.0).
|
||
- **Scores**: 각 셀에 옵션이 criterion을 얼마나 만족하는지 (1-5 또는 -1/0/+1 Pugh 방식).
|
||
- **Total**: Σ(score × weight) per alternative.
|
||
|
||
### 매 두 갈래
|
||
- **Weighted scoring** (Kepner-Tregoe): 절대 점수 1-5.
|
||
- **Pugh matrix**: baseline 대비 -/0/+ 만 사용 — 빠르고 bias 적음.
|
||
|
||
### 매 응용
|
||
1. **Architecture decision (ADR)**: alternative 비교 표를 ADR에 첨부 → reviewer가 가중치에 동의하는지 검증.
|
||
2. **Vendor selection**: cloud provider, observability tool, payment gateway.
|
||
3. **Refactor target prioritization**: impact × effort × risk 매트릭스.
|
||
|
||
## 💻 패턴
|
||
|
||
### Pandas로 weighted scoring
|
||
```python
|
||
import pandas as pd
|
||
|
||
criteria = ['latency', 'cost', 'team_skill', 'ops_burden', 'ecosystem']
|
||
weights = pd.Series({'latency': 0.30, 'cost': 0.20,
|
||
'team_skill': 0.25, 'ops_burden': 0.15, 'ecosystem': 0.10})
|
||
|
||
scores = pd.DataFrame({
|
||
'PostgreSQL': [4, 4, 5, 3, 5],
|
||
'DynamoDB': [5, 3, 2, 5, 4],
|
||
'MongoDB': [4, 3, 3, 3, 4],
|
||
}, index=criteria).T # rows = alternatives
|
||
|
||
totals = (scores * weights).sum(axis=1).sort_values(ascending=False)
|
||
print(totals)
|
||
# PostgreSQL 4.20
|
||
# DynamoDB 3.85
|
||
# MongoDB 3.30
|
||
```
|
||
|
||
### Pugh matrix (baseline 대비)
|
||
```python
|
||
baseline = 'PostgreSQL'
|
||
delta = scores - scores.loc[baseline]
|
||
delta['signed_total'] = delta.sum(axis=1)
|
||
print(delta[['signed_total']])
|
||
# signed_total
|
||
# PostgreSQL 0
|
||
# DynamoDB -2
|
||
# MongoDB -3
|
||
```
|
||
|
||
### Sensitivity analysis (가중치 변동에 대한 robustness)
|
||
```python
|
||
import numpy as np
|
||
rng = np.random.default_rng(42)
|
||
trials = []
|
||
for _ in range(1000):
|
||
perturbed = weights * rng.uniform(0.7, 1.3, size=len(weights))
|
||
perturbed /= perturbed.sum()
|
||
trials.append((scores * perturbed).sum(axis=1).idxmax())
|
||
|
||
pd.Series(trials).value_counts(normalize=True)
|
||
# PostgreSQL 0.81 → 가중치 ±30% 흔들어도 81%에서 1위 유지 → robust
|
||
# DynamoDB 0.19
|
||
```
|
||
|
||
### ADR에 매트릭스 embed (Markdown)
|
||
```markdown
|
||
## Decision
|
||
|
||
| Criterion (weight) | Postgres | DynamoDB | MongoDB |
|
||
|---|---|---|---|
|
||
| Latency p99 < 50ms (0.30) | 4 | 5 | 4 |
|
||
| Cost @ 10k req/s (0.20) | 4 | 3 | 3 |
|
||
| Team familiarity (0.25) | 5 | 2 | 3 |
|
||
| Ops burden (0.15) | 3 | 5 | 3 |
|
||
| Ecosystem (0.10) | 5 | 4 | 4 |
|
||
| **Weighted total** | **4.20** | **3.85** | **3.30** |
|
||
|
||
**Chosen**: PostgreSQL.
|
||
```
|
||
|
||
### Cost / Effort / Impact prioritization
|
||
```python
|
||
backlog = pd.DataFrame([
|
||
{'task': 'index DB', 'impact': 5, 'effort': 1, 'risk': 1},
|
||
{'task': 'rewrite auth', 'impact': 4, 'effort': 5, 'risk': 4},
|
||
{'task': 'add CDN', 'impact': 3, 'effort': 2, 'risk': 1},
|
||
])
|
||
backlog['ROI'] = backlog['impact'] / (backlog['effort'] * backlog['risk'])
|
||
print(backlog.sort_values('ROI', ascending=False))
|
||
```
|
||
|
||
## 매 결정 기준
|
||
| 상황 | Approach |
|
||
|---|---|
|
||
| 옵션 2-3개, 기준 명확 | weighted scoring |
|
||
| 옵션 많고 빠른 screening | Pugh matrix |
|
||
| Stakeholder 의견 분분 | sensitivity analysis 추가 |
|
||
| Criterion 자체에 동의 안 됨 | 매트릭스보다 먼저 criterion 합의 |
|
||
|
||
**기본값**: 가중치는 stakeholder workshop에서 합의 후 고정 — 점수만 토론.
|
||
|
||
## 🔗 Graph
|
||
- 부모: [[Architecture Decision Record]] · [[ATAM]]
|
||
- 변형: [[Pugh Matrix]] · [[Weighted Scoring]]
|
||
|
||
## 🤖 LLM 활용
|
||
**언제**: alternative 후보 5+ 개를 빠르게 narrow down, ADR 초안 작성 시.
|
||
**언제 X**: criterion 자체가 미정의 — 매트릭스가 의견 차이 숨김.
|
||
|
||
## ❌ 안티패턴
|
||
- **점수 사후 조정**: 결과가 마음에 안 들어 점수를 바꿈 → confirmation bias.
|
||
- **가중치를 결정 후 정하기**: 결론에 맞춰 weight reverse-engineering.
|
||
- **무한 criterion**: 20개 넘어가면 weight 차이 희석 → top-7로 제한.
|
||
- **Sensitivity analysis 생략**: 가중치 ±10%에 순위가 뒤집히면 결정이 약함.
|
||
|
||
## 🧪 검증 / 중복
|
||
- Verified (Stuart Pugh, *Total Design*, 1991; Kepner-Tregoe decision analysis).
|
||
- 신뢰도 A.
|
||
|
||
## 🕓 Changelog
|
||
| 날짜 | 변경 |
|
||
|---|---|
|
||
| 2026-05-08 | Phase 1 |
|
||
| 2026-05-10 | Manual cleanup — weighted/Pugh 두 변형, sensitivity analysis 추가 |
|