Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

hmm.sop

Calculation of HMM Sum of Path


Description

A Hidden Markov Model for the classification of states in a time series. Based on the transition probabilities and the so called emission probabilities (p(class|x)) the ‘prior probablilities’ of states (classes) in time period t given all past information in time period t are calculated.

Usage

hmm.sop(sv, trans.matrix, prob.matrix)

Arguments

sv

state at time 0

trans.matrix

matrix of transition probabilities

prob.matrix

matrix of p(class|x)

Value

Returns the ‘prior probablilities’ of states.

Author(s)

Daniel Fischer, Reinald Oetsch

References

Garczarek, Ursula Maria (2002): Classification rules in standardized partition spaces. Dissertation, University of Dortmund. URL http://hdl.handle.net/2003/2789

See Also

Examples

library(MASS)
data(B3)
trans.matrix <- calc.trans(B3$PHASEN)

# Calculate posterior prob. for the classes via lda
prob.matrix <- predict(lda(PHASEN ~ ., data = B3))$post
errormatrix(B3$PHASEN, apply(prob.matrix, 1, which.max))
prior.prob <- hmm.sop("2", trans.matrix, prob.matrix)
errormatrix(B3$PHASEN, apply(prior.prob, 1, which.max))

klaR

Classification and Visualization

v0.6-15
GPL-2 | GPL-3
Authors
Christian Roever, Nils Raabe, Karsten Luebke, Uwe Ligges, Gero Szepannek, Marc Zentgraf, David Meyer
Initial release
2020-02-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.