Welcome to Salesforce CausalAI Library's documentation!
Salesforce CausalAI is an open-source Python library for causal analysis using observational data. It supports causal discovery and causal inference for tabular and time series data (see figure above), of discrete, continuous and heterogeneous data types. It also supports Markov Blanket discovery algorithms. This library includes algorithms that handle linear and non-linear causal relationship between variables, and uses multi-processing for speed-up. We also include a data generator capable of generating synthetic data with specified structural equation model for both the aforementioned data formats and types, that helps users control the ground-truth causal process while investigating various algorithms. CausalAI includes benchmarking modules for tabular and time series data, that users can use to compare different causal discovery algorithms, as well as evaluate the performance of a particular algorithm across datasets with different challenges. Specifically, users can evaluate the performance of causal discovery algorithms on synthetic data with varying graph sparsity, sample complexity, variable complexity, SNR, noise type, and max lag (time series data). Finally, we provide a user interface (UI) that allows users to perform causal analysis on data without coding. The goal of this library is to provide a fast and flexible solution for a variety of problems in the domain of causality.
Installation
Prior to installing the library, create a conda environment with Python 3.9 or a later version. This can be done by executing conda create -n causal_ai_env python=3.9
. Activate this environment by executing conda activate causal_ai_env
. To install Salesforce CausalAI, git clone the library, go to the root directory of the repository, and execute pip install .
.
Before importing and calling the library, or launching the UI, remember to first activate the conda environemnt.
User Inferface (UI)
We provide an online UI for users to directly upload their data and run causal discovery and causal inference algorithms without the need to write any code. An introduction to the UI can be found here.
In order to launch the UI, go to the root directory of the library and execute ./launch_ui.sh
, and open the url specified in the terminal in a browser. In order to terminate the UI, press Ctrl+c in the terminal where the UI was launched, and then execute ./exit_ui.sh
.
Contents
- Causal Discovery
- Time Series
- Tabular
Grow-Shrink (Markov Blanket Discovery)
- Causal Inference
- Applications
- Time Series
- Benchmarking
- Tabular
- Time Series
- Other
Misc (plotting and evaluation)
- CI Tests for PC Algorithm
Tutorials
Prior Knowledge
Data
Causal Discovery for Time Series
Causal Discovery for Tabular Data
Benchmarking
Causal Inference