otlingam.models.OTICALiNGAM¶
- class OTICALiNGAM(random_state=None, max_iter=1000)[source]¶
ICA-based LiNGAM using optimal transport ICA.
This estimator learns a directed acyclic graph by estimating an unmixing matrix with OTICA. The resulting matrix is permuted and scaled before a causal order and adjacency matrix are estimated using ICA-LiNGAM’s existing implementation.
- Optimization settings:
random_state: Seed used by OTICA’s random number generator.
max_iter: Maximum number of OTICA optimization iterations.
- Variables:
_random_state (int | None) – Seed used by OTICA’s random number generator.
_max_iter (int) – Maximum number of OTICA optimization iterations.
_causal_order (list[np.integer] | None) – Internal causal ordering. None before fitting.
_adjacency_matrix (np.ndarray | None) – Internal weighted adjacency matrix. None before fitting.
causal_order (list[np.integer]) – Learned causal order from source to sink.
adjacency_matrix (np.ndarray) – Learned weighted adjacency matrix.
intercept (np.ndarray) – Intercepts of the structural equations.
Examples
>>> from otlingam import OTICALiNGAM >>> model = OTICALiNGAM(random_state=0, max_iter=1000) >>> model.fit(X) >>> model.causal_order_
- __init__(random_state=None, max_iter=1000)¶
Construct a ICA-based LiNGAM model.
- Parameters:
random_state (int, optional (default=None)) –
random_stateis the seed used by the random number generator.max_iter (int, optional (default=1000)) – The maximum number of iterations of FastICA.