Help for multiple sequences for hmmtrain

6 visualizzazioni (ultimi 30 giorni)
Tiago
Tiago il 13 Set 2014
Risposto: Abhas il 5 Giu 2025
Hello
I try to use HMM for predict degradation but i have problem to understand how use hmmtrain for more than one sequences
Thanks for the help

Risposte (1)

Abhas
Abhas il 5 Giu 2025
Hi @Tiago,
To train a Hidden Markov Model (HMM) using multiple observation sequences in MATLAB, you can utilize the "hmmtrain" function by providing your sequences in specific formats. This approach is beneficial when modeling processes like degradation over time.
The "hmmtrain" function supports multiple sequences in the following formats:
  • Matrix Format: Each row represents a separate sequence.
seq = [
1 2 3 2 1;
2 3 1 2 3;
3 1 2 3 1
];
  • Cell Array Format: Each cell contains a sequence vector.
seq = {
[1 2 3 2 1],
[2 3 1 2 3],
[3 1 2 3 1]
};
Both formats are acceptable for "hmmtrain". Ensure that your initial estimates for the transition ("TRGUESS") and emission ("EMITGUESS") probability matrices are appropriately defined.
Here's an example code:
% Define multiple sequences
seq = {
[1 2 3 2 1],
[2 3 1 2 3],
[3 1 2 3 1]
};
% Initial guesses for transition and emission matrices
TRGUESS = rand(3);
EMITGUESS = rand(3, 3);
% Train HMM
[ESTTR, ESTEMIT] = hmmtrain(seq, TRGUESS, EMITGUESS);
You may refer to the below documentation links to know more about the same:
I hope this helps!

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by