mschauer / CausalInference.jl

Causal inference, graphical models and structure learning in Julia
https://mschauer.github.io/CausalInference.jl/latest/
Other
190 stars 24 forks source link

Allow to a priori remove and a priori orient edges in the PC algorithm #55

Closed mschauer closed 3 years ago

mschauer commented 3 years ago

Essentially, the PC algorithm starts with a complete graph of all possible connections in https://github.com/mschauer/CausalInference.jl/blob/4bde12f104b1fe233fb9b3b0e065d8a8a97c85ec/src/skeleton.jl#L26

We can already remove some edges corresponding to known conditional independencies using a keyword argument.

Second, in https://github.com/mschauer/CausalInference.jl/blob/4bde12f104b1fe233fb9b3b0e065d8a8a97c85ec/src/pc.jl#L126 we start with each edge being bi-directed and then we remove directions until ending up with a directed graph. That is the point to a priori orient edges too. @archanarw