HMMPlotSerie {RHmm} | R Documentation |
This function plots the time series in each hidden state.
HMMPlotSerie(obs, states, dis="NORMAL", color="green")
obs |
the vector, list of vectors of observations |
states |
a ViterbiClass object which gives the hidden states or a vector or a lis of vectors of integer 1 to the number of hidden states |
dis |
Distribution name = 'NORMAL', 'DISCRETE', 'MIXTURE'. Default 'NORMAL'. |
color |
color for the kernel density plot |
none
HMMPlotSerie is not implemented for multivariate distributions.
The time series of observations for each hidden states of the model are plotted using:
plot(obs[states=i])) and i in 1..max(States)
viterbi, plot
data(n1d_3s) #Fits an 3 states gaussian model ResFit <- HMMFit(obs_n1d_3s, nStates=3) VitPath <- viterbi(ResFit, obs_n1d_3s) #plot the series HMMPlotSerie(obs_n1d_3s, VitPath)