This documentation is for astroML version 0.2

This page


astroML Mailing List

GitHub Issue Tracker


Scipy 2012 (15 minute talk)

Scipy 2013 (20 minute talk)


If you use the software, please consider citing astroML.

11.12.1. astroML.classification.GMMBayes

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

GMM 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_components : int or list

number of components to use in the gmm. If specified as a list, it must match the number of class labels

other keywords are passed directly to GMM :


fit(X, y)
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) Returns the mean accuracy on the given test data and labels.
set_params(**params) Set the parameters of this estimator.
__init__(n_components=1, **kwargs)