11.12.1. astroML.classification.GMMBayes

class astroML.classification.GMMBayes(n_components=1, **kwargs)[source]

GaussianMixture Bayes Classifier

This is a generalization to the Naive Bayes classifier: rather than modeling the distribution of each class with axis-aligned gaussians, GMMBayes models the distribution of each class with mixtures of gaussians. This can lead to better classification in some cases.

Parameters
n_componentsint or list

number of components to use in the GaussianMixture. If specified as a list, it must match the number of class labels. Default is 1.

**kwargsdict, optional

other keywords are passed directly to GaussianMixture

Methods

get_params([deep])

Get parameters for this estimator.

predict(X)

Perform classification on an array of test vectors X.

predict_log_proba(X)

Return log-probability estimates for the test vector X.

predict_proba(X)

Return probability estimates for the test vector X.

score(X, y[, sample_weight])

Returns the mean accuracy on the given test data and labels.

set_params(**params)

Set the parameters of this estimator.

fit

__init__(n_components=1, **kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.