medil.models.GaussianMCM
- class medil.models.GaussianMCM(**kwargs)[source]
Bases:
_MedilCausalModelLinear Gaussian MeDIL causal model.
Learns a bipartite latent→measurement causal structure and estimates linear Gaussian parameters (edge weights, error means, error variances) by constraint-based structure learning and least-squares optimization of the covariance matrix.
- Parameters:
biadj (ndarray of shape (num_latent, num_meas), optional) – Boolean biadjacency matrix. If empty (default), estimated from data during
fit().udg (ndarray of shape (num_meas, num_meas), optional) – Boolean undirected dependence graph over observed variables. If empty (default), estimated from data during
fit().rng (numpy.random.Generator, optional) – Random number generator used during
sample().
- biadj
Boolean biadjacency matrix (set after
fit()or at init).- Type:
ndarray of shape (num_latent, num_meas)
- parameters
Learned parameters with attributes
biadj_weights(shape(num_latent, num_meas)),error_means(shape(num_meas,)), anderror_variances(shape(num_meas,)).- Type:
object
Methods
__init__(**kwargs)fit(dataset)Fit a GaussianMCM to a dataset.
sample(sample_size[, include_latent])Sample observations from a GaussianMCM.