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

Returns:

Dictionary of statistics based on the fitted HMM.

Return type:

dict