pyhctsa.operations.model_fit.hmm_fit

pyhctsa.operations.model_fit.hmm_fit(y, train_p=0.8, num_states=3, random_seed=0)

Fits a Hidden Markov Model to sequential data.

Parameters:
y : array-like

The input time series.

train_p : float

The proportion of data to train on, 0 < train_p < 1. Default is 0.8.

num_states : int

The number of states in the HMM. Default is 3.

random_seed : int

Random seed. Default is 0.

Returns:

Dictionary of statistics based on the fitted HMM.

Return type:

dict