mvtsa.segmentation.GaussianHMMSegmenter#

class mvtsa.segmentation.GaussianHMMSegmenter(n_states=3, covariance='full', sticky=0.0, max_iter=100, tol=0.0001, n_init=2, max_states=8, standardize=True, random_state=0, min_duration=1)[source]#

Bases: BaseSegmenter

State detection with a Gaussian HMM.

Parameters:
n_statesint or “bic”

Number of hidden states, or select it from 1..``max_states`` by BIC.

covariance{“full”, “diag”}
stickyfloat

Pseudo-count added to the self-transitions in every M-step.

max_iter, tolint, float
n_initint

Restarts from different k-means initializations (best likelihood kept).

max_statesint

Upper bound for n_states="bic".

standardizebool
random_stateint, optional
min_durationint

Runs of a state shorter than this are absorbed by their neighbours after decoding (see mvtsa.simplify.smooth_states()).

Attributes:
means_, covars_, transmat_, startprob_arrays
log_likelihood_float
posteriors_array (T, K)

Smoothed state probabilities.

states_array (T,)

Viterbi state sequence.

predict(X)[source]#

Viterbi states of new data with the fitted model.

Examples using mvtsa.segmentation.GaussianHMMSegmenter#

Recurring operating states

Recurring operating states

Explaining operating regimes

Explaining operating regimes