You can install the package using pip by running pip install medil in a terminal. The default only requires NumPy and only allows for limited data simulation, linear Pearson correlation independence testing, and structure learning. There are additional optional requirements for extra features:




Installs all optional dependencies, for full functionality; equivalent to using all of the other keys below


Uses dcor to compute the (nonlinear) distance correlation.


Uses PyTorch Lightning to make generative adversarial networks (GANs) for advanced data simulation and learning the functional MeDIL causal model.


Uses NetworkX, matplotlib and seaborn for graph visualization and various plots.

In order to use these features, simply append the corresponding comma-separated keys after the package name in brackets (with no spaces), e.g., pip install medil[vis,dcor].

You may encounter problems with installation due to llvmlite which is required by numba which is required by dcor. These can usually be resolved by using a fresh virtual environment and then installing medil (with the all or dcor key) before any other packages.