mschauer / CausalInference.jl

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

Add Dor & Tasi PDAG completion algorithm #112

Closed mschauer closed 1 year ago

mschauer commented 1 year ago

See https://ftp.cs.ucla.edu/pub/stat_ser/r185-dor-tarsi.pdf. The implementation marks the sinks which were already oriented in a bit vector and does not make a copy of the graph.

mwien commented 1 year ago

Nice implementation!

Going through vertices from low to high degree in line https://github.com/mschauer/CausalInference.jl/blob/e9bae30dd96e6491036617a5e35aaa76c5475902/src/pdag.jl#L160 is a potential optimization, but for sparse graphs it should not matter much in any case.

mwien commented 1 year ago

I started the following WIP PR https://github.com/mschauer/CausalInference.jl/pull/113 which is somewhat related as it is about counting and listing the consistent extensions of a PDAG/CPDAG (in contrast to finding an arbitrary one).