SimPEG.utils.WeightedGaussianMixture#
- 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)[source]#
- Bases: - GaussianMixture- 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: - Parameters:
- n_componentsint
- Number of components 
- meshdiscretize.BaseMesh
- TensorMeshor- QuadTreeor Octree) mesh: the volume of the cells give each sample/observations its weight in the fitting proces
- actvnumpy.ndarry,optional
- Active indexes 
 
- n_components
 - Methods - aic(X)- Akaike information criterion for the current model on the input X. - bic(X)- Bayesian information criterion for the current model on the input X. - Compute the precisions matrices and their Cholesky decomposition. - Compute and set the precisions matrices and their Cholesky decomposition. - fit(X[, y])- Estimate model parameters with the EM algorithm. - fit_predict(X[, y])- Estimate model parameters using X and predict the labels for X. - Get metadata routing of this object. - get_params([deep])- Get parameters for this estimator. - order_clusters_GM_weight([outputindex])- 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). - predict(X)- Predict the labels for the data samples in X using trained model. - Evaluate the components' density for each sample. - sample([n_samples])- Generate random samples from the fitted Gaussian distribution. - score(X[, y])- Compute the per-sample average log-likelihood - Compute the log-likelihood of each sample. - score_samples_with_sensW(X, sensW)- Compute the weighted log probabilities for each sample. - set_params(**params)- Set the parameters of this estimator. 
Galleries and Tutorials using SimPEG.utils.WeightedGaussianMixture#
 
Petrophysically guided inversion (PGI): Linear example
 
Petrophysically guided inversion: Joint linear example with nonlinear relationships
 
Joint PGI of Gravity + Magnetic on an Octree mesh using full petrophysical information
 
Joint PGI of Gravity + Magnetic on an Octree mesh without petrophysical information