jakobrunge / tigramite

Tigramite is a python package for causal inference with a focus on time series data. The Tigramite documentation is at
https://jakobrunge.github.io/tigramite/
GNU General Public License v3.0
1.3k stars 274 forks source link

Speed of CausalMediation/CausalEffects #393

Open juste97 opened 7 months ago

juste97 commented 7 months ago

Hey,

I ran into a bit of a problem regarding mediation analysis using the graph from discovery. 

When using the toy model (graph with shape (3, 3, 3)), everything works fine. However, when using my actual output from the discovery step on the graph with shape (44, 44, 11), making an instance of the CausalMediation class never seems to finish. 

Is this expected behavior for large datasets? It's been running for about a day now. 

Also, maybe just on a side node, there is an interesting library called cuml which has GPU-accelerated implementations of some of the scikit models like KNeighborsRegressor which basically come with the same API. Might be interesting for this package, since the package import could e.g. just be put into a try/catch statement to get some speed 😄

Anyhow, thanks for the package @jakobrunge

jakobrunge commented 3 weeks ago

The class should be fast since it is linear. Which step is slow? It is a large graph, though...