I'm trying to fit a hidden Markov model using hmmlearn in python. I assume that my data is not formatted correctly, however the documentation is light for hmmlearn. Intuitively I would format the data as a 3 dimensional array of n_observations x n_time_points x n_features, but hmmlearn seems to want a 2d array.
import numpy as np
from hmmlearn import hmm
X = np.random.rand(10,5,3)
clf = hmm.GaussianHMM(n_components=3, n_iter=10)
clf.fit(X)
Which gives the following error:
ValueError: Found array with dim 3. Estimator expected <= 2.
Does anyone know how to format data in order to build the HMM I'm after?