Files
2nd/10_Wiki/Topics/Other/Analysis.md
T
Antigravity Agent f8b21af4be Wiki cleanup: error-doc removal, dedup merge, link normalization
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>
2026-05-20 23:52:15 +09:00

5.6 KiB

id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
id title category status canonical_id aliases duplicate_of source_trust_level confidence_score verification_status tags raw_sources last_reinforced github_commit tech_stack
wiki-2026-0508-analysis Analysis 10_Wiki/Topics verified self
Data Analysis
Analytical Method
none A 0.9 applied
analysis
methodology
reasoning
2026-05-10 pending
language framework
python 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)

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

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)

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)

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

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)

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

🤖 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