C.W.K.
Stream
Lesson 05 of 05 · published

Causality 한계

~24 min · causality, limits

Level 0Scout
0 XP0/48 lessons0/11 achievements
0/120 XP to next level120 XP to go0% complete

prediction이 intervention 아님

Observational data에 train된 ML 모델이 "세상이 그대로일 때 뭐가 likely?"에 답함. "feature X 바꾸면 어떻게 됨?"엔 답 안 해. 단지 predictor — cause 아님 — 인 feature에 act 하면 prediction 움직이지만 outcome 안 움직임.

흔한 혼동

  • "30일 ticket"이 churn 예측 → ticket 줄여도 churn 줄지 않을 수 있음 (둘 다 frustration이 cause).
  • "login count"가 retention 예측 → login 강제해도 user retain 안 함.
  • "discount 사용"이 loyalty 예측 → 모두에게 discount 주면 customer가 expect하게 train 시킴.

진짜 causality 필요할 때

질문이 "뭘 해야 하나?"면 experiment(A/B test), causal inference(DiD, instrumental variable), 또는 uplift modeling 필요. ML prediction이 누구한테 test 할지 prioritize 가능, 하지만 causal question 답하는 건 test이지 모델이 아님.

Code

uplift framing: outcome 말고 lift 예측·python
# Two-model uplift: train one model on treated, one on untreated
from lightgbm import LGBMClassifier

treated = LGBMClassifier().fit(X[treatment == 1], y[treatment == 1])
control = LGBMClassifier().fit(X[treatment == 0], y[treatment == 0])
uplift = treated.predict_proba(X)[:, 1] - control.predict_proba(X)[:, 1]
# Target users with the highest uplift, not the highest baseline probability
causal sanity check를 위한 DoWhy·python
import dowhy
from dowhy import CausalModel

model = CausalModel(
    data=df, treatment="discount_used",
    outcome="renewed", common_causes=["plan_tier", "tenure_days"]
)
estimand = model.identify_effect()
estimate = model.estimate_effect(estimand, method_name="backdoor.linear_regression")
print(estimate)

External links

Exercise

팀이 act 하려는 feature 하나("login 늘리기", "ticket 수 줄이기") 골라. causal graph 스케치 — 무엇이 feature를 cause, 무엇이 target을 cause, 무엇이 둘 다 cause. act 전 A/B test 필요한지 결정.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.