simpeg.utils.GaussianMixtureWithNonlinearRelationships#

class simpeg.utils.GaussianMixtureWithNonlinearRelationships(mesh, n_components=1, covariance_type='full', tol=0.001, reg_covar=1e-06, max_iter=100, n_init=1, init_params='kmeans', weights_init=None, means_init=None, precisions_init=None, random_state=None, warm_start=False, verbose=0, verbose_interval=10, cluster_mapping=None)[source]#

Bases: WeightedGaussianMixture

Gaussian mixture class for non-linear relationships.

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 can be given specified nonlinear relationships between physical properties. (polynomial etc.) Those nonlinear relationships are given in the form of a list of mapping (cluster_mapping argument). Functions are added and modified to fill that purpose, in particular the fit and samples functions.

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:
cluster_mapping(n_components) list

List of mapping describing a nonlinear relationships between physical properties; one per cluster/unit.

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_clusters_covariances()

Compute the precisions matrices and their Cholesky decomposition.

compute_clusters_precisions()

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()

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.

predict_proba(X)

Evaluate the components' density for each sample.

sample([n_samples])

[modified from Scikit-Learn.mixture.gaussian_mixture] Generate random samples from the fitted Gaussian distribution with nonlinear relationships.

score(X[, y])

Compute the per-sample average log-likelihood

score_samples(X)

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.GaussianMixtureWithNonlinearRelationships#

Petrophysically guided inversion: Joint linear example with nonlinear relationships

Petrophysically guided inversion: Joint linear example with nonlinear relationships