Closed scofield7419 closed 7 years ago
Hello,
The state probabilities are defined by the topology class passed to it. In this example, the code is using a Forward topology (where states cannot go back in time) as it can be seen by the "new Forward(states)" being passed to the classifier's constructor.
You can specify other state architectures by using the Ergodic (every state is connected to all other states) or Custom (you can pass the transition matrices as you would like). You can also initialize it with Forward and manually customize the transition matrices by adjusting
classifier.Models[index_of_the_class].LogTransitions[index_state_from][index_state_to] = log_probability;
Hope it helps!
Regards, Cesar
More examples have been added to the hidden Markov model documentation page.
Hi sir, when I use the HMM model to classify my sequences by using your codes I just specify the number of hidden states in this codes below:
new HiddenMarkovClassifier<MultivariateNormalDistribution>(classes.Count, new Forward(states), new MultivariateNormalDistribution(Num_features), classes.ToArray());
And I guess the HMM model choose the states automatically which is invisible to me. So I got a question that how can I know the specific states inside that HMM models.