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 dagsampler #137

Closed mschauer closed 6 months ago

mschauer commented 7 months ago

Seems to be correct: Finds all Dags and spends 1/25=0.04 time in each.

OrderedCollections.OrderedDict{Vector, Float64} with 25 entries:
  [2=>1, 3=>2]       => 0.041413
  [2=>1, 2=>3]       => 0.0408618
  [3=>1, 3=>2]       => 0.0405056
  [2=>3]             => 0.0404357
  [2=>1]             => 0.0403629
  [1=>3, 2=>3]       => 0.0403192
  [1=>2, 1=>3, 2=>3] => 0.0402318
  [2=>1, 3=>1, 3=>2] => 0.0402213
  [3=>1]             => 0.0401996
  [1=>2, 2=>3]       => 0.0400947
  [1=>2, 3=>1]       => 0.0400215
  [1=>3]             => 0.0400138
  [2=>3, 3=>1]       => 0.0399952
  [1=>3, 2=>1]       => 0.039991
  [1=>2, 3=>1, 3=>2] => 0.039985
  Any[]              => 0.0399456
  [2=>1, 2=>3, 3=>1] => 0.0399186
  [1=>2]             => 0.0396969
  [3=>2]             => 0.0396889
  [1=>3, 2=>1, 2=>3] => 0.039656
  [2=>1, 3=>1]       => 0.0395396
  [1=>2, 3=>2]       => 0.0394285
  [1=>2, 1=>3]       => 0.0393982
  [1=>2, 1=>3, 3=>2] => 0.0392891
  [1=>3, 3=>2]       => 0.0387867