ICA-LiNGAM¶

class lingam.ICALiNGAM(random_state=None, max_iter=1000)[source]

Implementation of ICA-based LiNGAM Algorithm [1]

References

 [1] S. Shimizu, P. O. Hoyer, A. Hyvärinen, and A. J. Kerminen. A linear non-gaussian acyclic model for causal discovery. Journal of Machine Learning Research, 7:2003-2030, 2006.
__init__(random_state=None, max_iter=1000)[source]

Construct a ICA-based LiNGAM model.

Parameters: random_state (int, optional (default=None)) – random_state is the seed used by the random number generator. max_iter (int, optional (default=1000)) – The maximum number of iterations of FastICA.
adjacency_matrix_

Returns: adjacency_matrix_ – The adjacency matrix B of fitted model, where n_features is the number of features. array-like, shape (n_features, n_features)
bootstrap(X, n_sampling)

Evaluate the statistical reliability of DAG based on the bootstrapping.

Parameters: X (array-like, shape (n_samples, n_features)) – Training data, where n_samples is the number of samples and n_features is the number of features. n_sampling (int) – Number of bootstrapping samples. result – Returns the result of bootstrapping. BootstrapResult
causal_order_

Estimated causal ordering.

Returns: causal_order_ – The causal order of fitted model, where n_features is the number of features. array-like, shape (n_features)
estimate_total_effect(X, from_index, to_index)

Estimate total effect using causal model.

Parameters: X (array-like, shape (n_samples, n_features)) – Original data, where n_samples is the number of samples and n_features is the number of features. from_index – Index of source variable to estimate total effect. to_index – Index of destination variable to estimate total effect. total_effect – Estimated total effect. float
fit(X)[source]

Fit the model to X.

Parameters: X (array-like, shape (n_samples, n_features)) – Training data, where n_samples is the number of samples and n_features is the number of features. self – Returns the instance of self. object
get_error_independence_p_values(X)

Calculate the p-value matrix of independence between error variables.

Parameters: X (array-like, shape (n_samples, n_features)) – Original data, where n_samples is the number of samples and n_features is the number of features. independence_p_values – p-value matrix of independence between error variables. array-like, shape (n_features, n_features)