8.11.1. sklearn.hmm.GaussianHMM

class sklearn.hmm.GaussianHMM(n_components=1, covariance_type='diag', startprob=None, transmat=None, startprob_prior=None, transmat_prior=None, algorithm='viterbi', means_prior=None, means_weight=0, covars_prior=0.01, covars_weight=1, random_state=None)

Hidden Markov Model with Gaussian emissions

Representation of a hidden Markov model probability distribution. This class allows for easy evaluation of, sampling from, and maximum-likelihood estimation of the parameters of a HMM.

Parameters :

n_components : int

Number of states.

_covariance_type : string

String describing the type of covariance parameters to use. Must be one of ‘spherical’, ‘tied’, ‘diag’, ‘full’. Defaults to ‘diag’.

See also

GMM
Gaussian mixture model

Examples

>>> from sklearn.hmm import GaussianHMM
>>> GaussianHMM(n_components=2)
...                             
GaussianHMM(algorithm='viterbi', covariance_type='diag', covars_prior=0.01,
    covars_weight=1, means_prior=None, means_weight=0, n_components=2,
    random_state=None, startprob=None, startprob_prior=1.0, transmat=None,
    transmat_prior=1.0)

Attributes

Previous
Next