simpeg.utils.GaussianMixtureWithNonlinearRelationshipsWithPrior#
- class simpeg.utils.GaussianMixtureWithNonlinearRelationshipsWithPrior(gmmref, kappa=0.0, nu=0.0, zeta=0.0, prior_type='semi', cluster_mapping=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, update_covariances=True, fixed_membership=None)[source]#
Bases:
GaussianMixtureWithPrior
Gaussian mixture class for non-linear relationships with priors.
This class built upon the GaussianMixtureWithPrior, which itself built upon from the WeightedGaussianMixture, built up from the mixture.gaussian_mixture.GaussianMixture class from Scikit-Learn.
In addition to weights samples/observations by the cells volume of the mesh (from WeightedGaussianMixture), and nonlinear relationships for each cluster (from GaussianMixtureWithNonlinearRelationships), this class uses a posterior approach to fit the GMM parameters (from GaussianMixtureWithPrior). 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 GaussianMixtureWithPrior:
- Parameters:
- cluster_mapping(
n_components
)list
List of mapping describing a nonlinear relationships between physical properties; one per cluster/unit.
- cluster_mapping(
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, debug])Estimate model parameters with the EM algorithm.
fit_predict
(X[, y, debug])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_cluster
([outputindex])Order cluster
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_fit_request
(*[, debug])Request metadata passed to the
fit
method.set_params
(**params)Set the parameters of this estimator.
update_gmm_with_priors
([debug])Update GMM with priors