Algorithm Introduction

Causal Discovery with Fast Causal Inference (FCI 1).


from causallearn.search.ConstraintBased.FCI import fci
G = fci(data, indep_test, alpha, verbose=True)


data: numpy.ndarray, shape (n_samples, n_features). Data, where n_samples is the number of samples and n_features is the number of features.

alpha: Significance level of individual partial correlation tests.

indep_test: Independence test method function.
  • fisherz”: Fisher’s Z conditional independence test.

  • chisq”: Chi-squared conditional independence test.

  • gsq”: G-squared conditional independence test.

  • kci”: kernel-based conditional independence test. (As a kernel method, its complexity is cubic in the sample size, so it might be slow if the same size is not small.)

  • mv_fisherz”: Missing-value Fisher’s Z conditional independence test.

verbose: 0 - no output, 1 - detailed output.


G : a GeneralGraph object. Nodes in the graph correspond to the column indices in the data. For visualization, please refer to the running example.


Spirtes, P., Meek, C., & Richardson, T. (1995, August). Causal inference in the presence of latent variables and selection bias. In Proceedings of the Eleventh conference on Uncertainty in artificial intelligence (pp. 499-506).