baumwelchcont: Baum-Welch Algorithm

Description Usage Arguments Value Author(s) References See Also Examples

Description

The function performs Baum-Welch algorithm with Gaussian PDFs (Baum et al, 1970; Rabiner, 1989). It allows to control the model parameters after each iteration, and accumulates the information on the model evolution. The intended use is to perform repeated executions and to save the returned object into the argument object (see examples below).

Usage

1

Arguments

hmm

An object of the class ContObservHMM.

Value

An object of the class ContObservHMM (see section on the function hmmsetcont). After sufficient number of iterations the object can be used to derive the Markov states sequence by the Viterbi algorithm (function viterbicont). The object can be analysed with the class-specific functions print, summary, and plot.

Author(s)

Mikhail A. Beketov

References

Baum, L.E., Petrie, T., Soules, G., and Weiss, N. 1970. A maximization technique occurring in the statistical analysis of probabilistic functions of Markov chains. The Annals of Mathematical Statistics. 41: 164-171.

Rabiner, L.R. 1989. A tutorial on hidden Markov models and selected applications in speech recognition. Proceedings of the IEEE. 77: 257-286.

See Also

Functions: hmmsetcont, viterbicont, and statesDistributionsPlot.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
Returns<-logreturns(Prices) # Getting a stationary process
Returns<-Returns*10 		# Scaling the values
hmm<-hmmsetcont(Returns) 	# Creating a HMM object
print(hmm) 					# Checking the initial parameters

hmm<-baumwelchcont(hmm) 	# First iteration
print(hmm)					# Inspecting

for(i in 1:5){hmm<-baumwelchcont(hmm)} # Subsequent iterations 
print(hmm)					# Inspecting

hmmcomplete<-viterbicont(hmm) # Viterbi execution
par(mfrow=c(2,1))
plot(hmmcomplete, Prices, ylabel="Price") 
plot(hmmcomplete, ylabel="Returns") # the revealed 
# Markov chain and the observations are plotted

HMMCont documentation built on May 1, 2019, 10:46 p.m.