Skip to content

Commit 26470ba

Browse files
authored
Merge pull request #30 from Funbucket/add/graph-based-approach
변경해주신 내용 확인하여 merge 처리하였습니다! 처음에는 dowhy의 리뷰라고 생각해서 관련하여 코멘트를 작성했는데, 다른 코드 작성해주신 것 보고 구성하신 의도 확인하였습니다. 이대로 진행하면 될 것 같습니다 감사합니다!
2 parents 0cc3e34 + 40b30a2 commit 26470ba

File tree

6 files changed

+945
-0
lines changed

6 files changed

+945
-0
lines changed

.DS_Store

-6 KB
Binary file not shown.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,5 @@ _build/
136136

137137
# poetry files
138138
pyproject.toml
139+
140+
.DS_Store

book/_toc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ parts:
55
- caption: Contents
66
chapters:
77
- file: prior_knowledge/overview.md
8+
- file: scm/overview.md
9+
sections:
10+
- file: scm/backdoor_criterion.ipynb
811
- file: ate/overview.md
912
sections:
1013
- file: ate/ols.ipynb

book/scm/backdoor_criterion.ipynb

Lines changed: 885 additions & 0 deletions
Large diffs are not rendered by default.

book/scm/causal_model.png

81.9 KB
Loading

book/scm/overview.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Structural Causal Model(SCM)
2+
3+
SCM(Structural Causal Model)은 변수 간의 causal mechanism을 구조방정식과 DAG로 표현하는 접근입니다.
4+
이 섹션에서는 주요 식별 전략을 중심으로, 실제 데이터를 활용한 인과효과 분석을 다룹니다.
5+
6+
---
7+
8+
## 1. Backdoor Criterion
9+
10+
- **식별 전략:**
11+
원인과 결과 모두에 영향을 미치는 교란변수(confounder) 를 통제하여,
12+
인과효과를 다음과 같이 식별합니다.
13+
14+
$$
15+
P(Y \mid do(X)) = \sum_Z P(Y \mid X, Z) P(Z)
16+
$$
17+
18+
- **데이터:** *National Health and Nutrition Examination Survey (NHEFS)*
19+
20+
---
21+
22+
## 2. Frontdoor Criterion
23+
24+
- **식별 전략:**
25+
원인($X$)이 결과($Y$)에 미치는 효과가 매개변수($M$)을 통해서만 전달될 때,
26+
다음 식을 통해 인과효과를 간접적으로 식별합니다.
27+
28+
$$
29+
P(Y \mid do(X)) = \sum_M P(M \mid X) \sum_{X'} P(Y \mid M, X') P(X')
30+
$$
31+
32+
- **데이터:** *NYC TLC 2023 High Volume FHV Trip Records*
33+
34+
---
35+
36+
## 3. Instrument Variable (IV)
37+
38+
- **식별 전략:**
39+
($X$)와 ($Y$) 간의 내생성(endogeneity) 문제를 해결하기 위해,
40+
($X$)에는 영향을 주지만 ($Y$) 에는 직접 영향을 미치지 않는 도구변수($Z$)를 사용합니다.
41+
인과효과는 다음과 같이 식별됩니다.
42+
43+
$$
44+
\hat{\beta}_{IV} = \frac{\operatorname{Cov}(Z, Y)}{\operatorname{Cov}(Z, X)}
45+
$$
46+
- **데이터:** 추후 확정 예정
47+
48+
---
49+
50+
## 4. Causal Discovery
51+
52+
- **목표:**
53+
변수 간 조건부 독립성(Conditional Independence)을 이용해 데이터로부터 DAG 구조를 학습하고 인과 방향성을 탐색합니다.
54+
55+
- **데이터:** 추후 확정 예정

0 commit comments

Comments
 (0)