Questions tagged [seqhmm]

7 questions
3
votes
1 answer

Arranging Plots from TraMineR and seqHMM

I want to plot two sequence distribution plots with the TraMineR package (seqplot(type = 'd')) and below them two Hidden Markov Models which correspond to the sequence plots (those are clusters). For the reprex, I just use the build in biofam data…
3
votes
1 answer

Obtaining the observations within each cluster for Mixture of Hidden Markov Model (MHMM) in R (Package seqHMM)

I am using Mixture of Hidden Markov Model (MHMM) to cluster my data. To do so, I used Package "seqHMM" in R. My question is whether it is possible to obtain the actual observations within each cluster. Like for example, after my analysis, I have 3…
1
vote
1 answer

emission probabilities for HMM in R

How can we calculate Emission probabilities for a Hidden Markov Model (HMM) in R? As for calculating Transition Probabilities we use function tr <- seqtrate(exampledata) and this function returns a Transition Matrix. Example data is a sequential…
0
votes
0 answers

Creating a new dataset of hidden state probabilities using a HMM results in different shapes after each run

I'm trying to create a new dataset of hidden state probabilities using a hidden Markov model. Everything works fine unless each time the output dataset comes up with different values (sometimes the same values) for hidden_states_train and…
0
votes
0 answers

Length of initial_probs is not equal to the number of states

I am new to R. While making a Hidden markov model we have to give the following parameters; initial prob, emission prob, transition prob, observations. But I am getting the following error Length of initial_probs is not equal to the number of…
0
votes
0 answers

Undefined columns

I am trying to implement HMM in R. Right now I have 18 columns in my dataset. When I am making an emission matrix, it gives an error of undefined columns, I don't know where I am doing it wrong. library(seqHMM) emix <- matrix(NA, nrow = 3, ncol =…
0
votes
1 answer

Error: seqdata should be a state sequence object, an event sequence object, or a suffix tree. Use seqdef or seqecreate

I have a sequence of data (similar to protein data) and I want to use the mixture of hidden Markov model (mhmm) to cluster them. I chose seqHMM package to do it. but when I want to train a mhmm model, it gives this error: build_mhmm(observations =…
Hadij
  • 3,661
  • 5
  • 26
  • 48