I would like to generate samples of symbols, not a digits from hmm.MultinomialHMM
.
My code for instance:
model = hmm.MultinomialHMM(n_components=2)
tr =np.array([[0.8, 0.2],
[0.3, 0.7]])
model.n_features = 4
em = np.array([[0.3,0.7,0.0,0.0],
[0.0,0.0,0.1,0.9]])
model.transmat_ = tr
model.emissionprob_=em
model.startprob_ = np.array([0.5,0.5])
#generate sample
symb, hid = model.sample(10)
So symb
is
array([[1],
[1],
[3],
[3],
[3],
[2],
[3],
[3],
[1],
[3]])
But I need to set a symbols