- class SimPEG.utils.WeightedGaussianMixture(n_components, mesh, actv=None, covariance_type='full', init_params='kmeans', max_iter=100, means_init=None, n_init=10, precisions_init=None, random_state=None, reg_covar=1e-06, tol=0.001, verbose=0, verbose_interval=10, warm_start=False, weights_init=None)#
Weighted Gaussian mixture class
This class upon the GaussianMixture class from Scikit-Learn. Two main modifications:
1. Each sample/observation is given a weight, the volume of the corresponding discretize.BaseMesh cell, when fitting the Gaussian Mixture Model (GMM). More volume gives more importance, ensuing a mesh-free evaluation of the clusters of the geophysical model.
2. When set manually, the proportions can be set either globally (normal behavior) or cell-by-cell (improvements)
Disclaimer: this class built upon the GaussianMixture class from Scikit-Learn. New functionalitie are added, as well as modifications to existing functions, to serve the purposes pursued within SimPEG. This use is allowed by the Scikit-Learn licensing (BSD-3-Clause License) and we are grateful for their contributions to the open-source community.
Addtional parameters to provide, compared to sklearn.mixture.gaussian_mixture:
Number of components
QuadTreeor Octree) mesh: the volume of the cells give each sample/observations its weight in the fitting proces
Compute the precisions matrices and their Cholesky decomposition.
Compute and set the precisions matrices and their Cholesky decomposition.
Order clusters by decreasing weights
plot_pdf([ax, flag2d, x_component, ...])
Utils to plot the marginal PDFs of a GMM, either in 1D or 2D (1 or 2 physical properties at the time).
Compute the per-sample average log-likelihood
Compute the weighted log probabilities for each sample.