SimPEG.utils.GaussianMixtureWithPrior#

class SimPEG.utils.GaussianMixtureWithPrior(gmmref, kappa=0.0, nu=0.0, zeta=0.0, prior_type='semi', update_covariances=True, fixed_membership=None, 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: WeightedGaussianMixture

This class built upon the WeightedGaussianMixture, which itself built upon from the mixture.gaussian_mixture.GaussianMixture class from Scikit-Learn.

In addition to weights samples/observations by the cells volume of the mesh, this class uses a posterior approach to fit the GMM parameters. This means it takes prior parameters, passed through WeightedGaussianMixture gmmref. The prior distribution for each parameters (proportions, means, covariances) is defined through a conjugate or semi-conjugate approach (prior_type), to the choice of the user. See Astic & Oldenburg 2019: A framework for petrophysically and geologically guided geophysical inversion (https://doi.org/10.1093/gji/ggz389) for more information.

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 WeightedGaussianMixture:

Parameters:
kappanumpy.ndarray

strength of the confidence in the prior means

nunumpy.ndarry

strength of the confidence in the prior covariances

zetanumpy.ndarry

strength of the confidence in the prior proportions

prior_typestr

Choose from one of the following:

  • “semi”: semi-conjugate prior, the means and covariances priors are indepedent

  • “full”: conjugate prior, the means and covariances priors are inter-depedent

update_covariancesbool

Choose from two options:

  • True: semi or conjugate prior by averaging the covariances

  • False: alternative (not conjugate) prior: average the precisions instead

fixed_membershipnumpy.ndarray of int, optional

A 2d numpy.ndarray to fix the membership to a chosen lithology of particular cells. The first column contains the numeric index of the cells, the second column the respective lithology index. Shape is (index of the fixed cell, lithology index) fixed_membership:

Methods

fit(X[, y, debug])

Estimate model parameters with the EM algorithm.

fit_predict(X[, y, debug])

Estimate model parameters using X and predict the labels for X.

order_cluster([outputindex])

Order cluster

set_fit_request(*[, debug])

Request metadata passed to the fit method.

update_gmm_with_priors([debug])

Update GMM with priors

Galleries and Tutorials using SimPEG.utils.GaussianMixtureWithPrior#

Joint PGI of Gravity + Magnetic on an Octree mesh without petrophysical information

Joint PGI of Gravity + Magnetic on an Octree mesh without petrophysical information