728x90

https://www.inference.vc/causal-inference-2-illustrating-interventions-in-a-toy-example/

 

Causal Inference 2: Illustrating Interventions via a Toy Example

Last week I had the honor to lecture at the Machine Learning Summer School in Stellenbosch, South Africa. I chose to talk about Causal Inference, despite being a newcomer to this whole area. In fact, I chose it exactly because I'm a newcomer: causal infere

www.inference.vc

 

Three scripts

 

본 글에서는 앞서 살펴본 intervention이라는 개념을 Toy example을 통해서 살펴본다.

아래와 같이 실제로는 결과가 같지만 과정이 다른 3가지 gaussian distribution script가 있다.

 

이는 결과적으로는 모두 같기 때문에 결과를 봐서는 구분이 불가능하다.

 

 

Interventions

 

물론 이 3가지 scripts는 동일한 distribution을 나타내지만, 완전히 동일한 것은 아니다.

예를 들어 이 3가지 scripts에 interfere나 intervention이 들어가게 되면 다른 결과를 도출하게 된다.

 

예를 들어 나는 x가 3으로 고정되기를 원했고 그래서 아래와 같이 x=3으로 setting했다고 가정해보자.

 

 

이렇게 intervention이 이루어진 경우 다음과 같이 distribution이 바뀌게 된다.

 

이를 marginal distribution 형태로 표현하면 다음과 같다.

 

 

그러나 이러한 intervention이 들어가지 않은 경우에는 3개다 같은 distribution이다.

 

결론적으로 data의 joint distribution 정보만으로는 intervention이 적용되었을 때의 distribution을 알기는 힘들다는 것이다.

 

 

Causal Diagrams

 

이러한 상황에서 intervention을 적용했을 때, distribution을 어떻게 알 수 있을까?

바로 causal diagram을 이용하는 것이다.

 

아래 scripts 같은 경우는 아래와 같이 causal diagram을 그릴 수 있다.

이 causal diagram을 이용해서 실제로 어떤 setting에 대해서 실험을 하지 않아도

intervention distribution을 구할 수 있고, 이 부분에 사용되는 것이 바로 'do-calculus'이다.

 

 

이러한 intervention의 효과를  graphically하게 나타낸 것이 바로 causal diagram에서 mutilation (제거, 훼손)을 수행한 다음 그림이다.

 

이에 따라 intervention을 수행했을 때, distribution이 어떻게 바뀔지 우리는 sampling하지 않고도 예측이 가능하다.

예를 들어 맨처음 예시 같은 경우는 x=3으로 고정을 하면 그에 따른 영향을 받기 때문에. p(y|do(X)) = p(y|x)라고 생각할 수 있으나, 두번째 case의 경우는 x에 y가 관련이 없기 때문에 x=3으로 고정을 하더라도 p(y) 그대로 나옴을 알 수 있다.

 

실제로 아래와 같이 도출이 가능하다.

 

 

728x90

'Math > Causal Inference' 카테고리의 다른 글

Part 3: Counterfactuals  (0) 2021.07.21
Part 1: Intro to causal inference and do-calculus  (0) 2021.07.15

+ Recent posts