depynd.markov_networks._glasso()

depynd.markov_networks._glasso(X, lamb, return_precision=False, **kwargs)

Learn the structure of Markov random field with the graphical lasso.

This function internally calls the implementation in scikit-learn.

Parameters:
  • X (array, shape (n_samples, n_features)) – Observations of variables.
  • lamb (float) – Regularization parameter.
  • return_precision (bool, default False) – If True, the estimated precision matrix will be returned instead of adjacency matrix.
Returns:

adj – Estimated adjacency matrix (or precision matrix if return_precision is True) of an MRF.

Return type:

array, shape (n_features, n_features)