Files
2nd/10_Wiki/Topic_General/From_Other/Analysis.md
T
Antigravity Agent 9148c358d0 docs(10_Wiki): 위키 전체 재구성 — Topic_* 폴더를 4개 카테고리로 통합 + 대규모 중복 제거
Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를
Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류.

- 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로
  자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거,
  동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거.
- 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming,
  Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business,
  Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로,
  나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는
  title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백).
  원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지.
- 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서.
- 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는
  지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지.
- Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경.
- 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
2026-07-05 00:33:48 +09:00

175 lines
5.6 KiB
Markdown

---
id: wiki-2026-0508-analysis
title: Analysis
category: 10_Wiki/Topics
status: verified
canonical_id: self
aliases: [Data Analysis, Analytical Method]
duplicate_of: none
source_trust_level: A
confidence_score: 0.9
verification_status: applied
tags: [analysis, methodology, reasoning]
raw_sources: []
last_reinforced: 2026-05-10
github_commit: pending
tech_stack:
language: python
framework: pandas
---
# Analysis
## 매 한 줄
> **"매 Analysis는 복잡한 whole를 component parts로 decompose하여 underlying structure를 understand하는 systematic process이다"**. Aristotle의 logical decomposition에서 시작하여, modern data science(2026)에서는 EDA, statistical inference, causal analysis까지 spectrum이 확장되었다. 매 핵심은 reduction 자체가 아니라, decomposition 후의 synthesis로 actionable insight를 도출하는 것.
## 매 핵심
### 매 Analysis vs Synthesis
- **Analysis**: top-down decomposition — whole → parts → relationships.
- **Synthesis**: bottom-up integration — parts → whole.
- 매 둘은 paired operation — analysis만 하면 fragmentation, synthesis만 하면 superficial generalization.
### 매 분석 dimensions
- **Descriptive**: "무엇이 happened?" — summary statistics, distributions.
- **Diagnostic**: "왜 happened?" — correlation, causal inference.
- **Predictive**: "무엇이 happen할 것인가?" — forecasting models.
- **Prescriptive**: "무엇을 해야 하나?" — optimization, decision theory.
### 매 응용
1. EDA (Exploratory Data Analysis) — Tukey의 1977 framework, 매 modern DS의 first step.
2. Root Cause Analysis — 5 Whys, fishbone, fault tree.
3. Sensitivity Analysis — input perturbation으로 model robustness 측정.
4. Failure Mode Analysis (FMEA) — engineering risk assessment.
## 💻 패턴
### EDA quickstart (Polars 2026)
```python
import polars as pl
import matplotlib.pyplot as plt
df = pl.read_parquet("data.parquet")
print(df.schema)
print(df.null_count())
print(df.describe())
for col in df.select(pl.col(pl.NUMERIC_DTYPES)).columns:
df[col].to_pandas().hist(bins=50)
plt.title(col); plt.show()
```
### Correlation matrix with significance
```python
import numpy as np
from scipy import stats
def corr_with_pvalues(df):
cols = df.select_dtypes(include=np.number).columns
n = len(cols)
corr = np.zeros((n, n)); pval = np.zeros((n, n))
for i, a in enumerate(cols):
for j, b in enumerate(cols):
r, p = stats.pearsonr(df[a].dropna(), df[b].dropna())
corr[i, j] = r; pval[i, j] = p
return corr, pval
```
### Causal analysis (DoWhy 2026)
```python
from dowhy import CausalModel
model = CausalModel(
data=df,
treatment="ad_spend",
outcome="revenue",
common_causes=["season", "channel", "brand"],
)
identified = model.identify_effect()
estimate = model.estimate_effect(
identified, method_name="backdoor.linear_regression"
)
refute = model.refute_estimate(
identified, estimate, method_name="random_common_cause"
)
print(estimate.value, refute)
```
### Sensitivity analysis (SALib)
```python
from SALib.sample import sobol
from SALib.analyze import sobol as sobol_analyze
problem = {
"num_vars": 3,
"names": ["x1", "x2", "x3"],
"bounds": [[0, 1]] * 3,
}
X = sobol.sample(problem, 1024)
Y = np.array([model_fn(*x) for x in X])
Si = sobol_analyze.analyze(problem, Y)
print(Si["S1"], Si["ST"])
```
### Failure Mode tabulation
```python
fmea = pl.DataFrame({
"mode": ["timeout", "OOM", "race"],
"severity": [7, 9, 8],
"occurrence": [4, 2, 3],
"detection": [5, 6, 9],
})
fmea = fmea.with_columns(
(pl.col("severity") * pl.col("occurrence") * pl.col("detection")).alias("RPN")
).sort("RPN", descending=True)
```
### LLM-assisted analysis (Claude Opus 4.7)
```python
from anthropic import Anthropic
client = Anthropic()
resp = client.messages.create(
model="claude-opus-4-7",
max_tokens=2048,
system="You are a senior data analyst. Output JSON: {findings, hypotheses, next_steps}.",
messages=[{"role": "user", "content": f"Summary stats:\n{df.describe()}"}],
)
```
## 매 결정 기준
| 상황 | Approach |
|---|---|
| New dataset, no prior | EDA + descriptive |
| Known outcome, want drivers | Diagnostic + causal |
| Need forecast | Predictive ML |
| Decision under uncertainty | Prescriptive + sensitivity |
| Post-incident | Root cause + FMEA |
**기본값**: EDA first — 매 어떤 sophisticated method도 raw data 의 distribution 의 understanding 없이는 misleading하다.
## 🔗 Graph
- 부모: [[Scientific Method]]
- 변형: [[Exploratory Data Analysis (EDA)]] · [[Causal Inference]] · [[Root Cause Analysis]]
- 응용: [[Decision Making]] · [[Debugging]]
- Adjacent: [[Synthesis]] · [[Statistics]]
## 🤖 LLM 활용
**언제**: hypothesis generation, summary narration, code scaffolding for analysis pipelines, anomaly explanation.
**언제 X**: precise statistical inference (use proper tools), causal claims without proper identification, large-N numeric crunching (use pandas/polars not LLM).
## ❌ 안티패턴
- **Analysis paralysis**: 매 endless decomposition without synthesis — 의 decision 의 deferred.
- **Confirmation bias**: 매 only analyzing data that supports prior hypothesis.
- **Spurious correlation**: 매 correlation을 causation으로 confuse.
- **Over-decomposition**: 매 component-level optimization 의 global suboptimum.
## 🧪 검증 / 중복
- Verified (Tukey 1977 *Exploratory Data Analysis*; Pearl 2009 *Causality*).
- 신뢰도 A.
## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — full content with 6 patterns + decision matrix |