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

Scm/equations #155

Closed JorgeLuizFranco closed 2 months ago

JorgeLuizFranco commented 3 months ago

Added basic retrieval equations from CausalGraph generated.

For now, the regression is pure OLS, but we can make improvements. Also, we assume the input for retrieving the equations a SimpleDigraph(est_g in the examples) and a DataFrame, and return the variables and the corresponding coefficients ( linear relationships assumption).

JorgeLuizFranco commented 3 months ago

Expect and check if it is a DAG. Get residual of OLS. x = coefficient[1] + scale[1]*randn(). Parameter ::AbstractMatrix use Tables.jl. SCM should also return the DAG.

mschauer commented 2 months ago

A couple of todo's:

[ ] include the file in CausalInference.jl [ ] figure out if you really need DataFrames, and if so, add it to the project [ ] write a simple test making sure the code runs.

JorgeLuizFranco commented 2 months ago

A couple of todo's:

[ ] include the file in CausalInference.jl [ ] figure out if you really need DataFrames, and if so, add it to the project [ ] write a simple test making sure the code runs.

Done, Moritz

mschauer commented 2 months ago

Ah great, that is taking shape.

1.) Can you uncommit the changes to the yaml files, why is a figure deleted? 2.) Include the test in runtest.jl

JorgeLuizFranco commented 2 months ago

I think everything now is as requested @mschauer

JorgeLuizFranco commented 2 months ago

Closes #154