Learn R Programming

How to use

Travis-ci status:

This R package can be used for the analysis of asymmetric hidden Markov models. The files together form a package.

After the package has been installed, you can load it using:

library(hmma)

After the package has been loaded, you find its description, functios and vignettes by:

?hmma

All package functions and files must be organised in the R folder. To use and test the package, place files in the Development folder.

A demonstration:

# Show part of the data set
head(hmmaExampleData$x, 10)

# We specify the amount of states and fit the model
amountOfStates <- 3
fit <- learnModel(hmmaExampleData, amountOfStates = amountOfStates)

# Visualise the model
visualise(fit)

# Load required libraries and files for visualising the Bayesian networks
library(bnlearn)
for (i in 1:amountOfStates) {
  graphviz.plot(fit$parms.emission[[i]])
}

The datafile must comply with the required format (more on that later). An example dataset is provided in hmmaExampleData.

For a full demonstration, please refer to the introduction vignette that can be found by:

browseVignettes(package = "hmma")

Copy Link

Version

Install

install.packages('hmma')

Monthly Downloads

7

Version

1.1.0

License

GPL-3

Maintainer

Arjen Hommersom

Last Published

June 26th, 2020

Functions in hmma (1.1.0)

hmma

hmma: A package for the contruction of asymmetric hidden Markov models
learnModel

Learna a HMM-A from data
rbn.hssm

Random emission from Bayesian network.
predict.hmma

Predict sequence of data on HMMA
createbnFromData

Creates a Bayesian network from a datafile
checkDataFile

Check the data file
visualise

Visualise the HMM-A
simulate.hmma

Simulates a HMM-A.
hmmaExampleData

An example dataset for use on HMM-As
createHmma

Create an asymmetric hidden Markov model.
createbn

Creates a Bayesian network without arcs.
randomNumbers

Creates a random distribution over numbers.