emissions-set: Set the emissions of the model

Description Usage Arguments Value See Also Examples

Description

Sets the emissions of the model.

The number of rows must match the number of states. If a matrix is provided, it is converted to column major sparse matrix (dgCMatrix).

Usage

1
emissions(x) <- value

Arguments

x

A HMM model.

value

A (sparse column major) matrix with the likelihoods of each emission (column) conditioned on the state (row).

Value

Changes the emissions matrix in the model.

See Also

HMM, emissions

Examples

1
2
3
4
5
6
7
model <- HMMrectangle(10,10)
tws <- matrix(c(3.2, 6.1, 2.2, 5.7, 5.9, 9.3, 5.4,
4.0, 2.9, 8.6, 6.9, 6.2, 9.7, 1.3),
nrow = 2, ncol = 7)
S <- function(x) if (x > 5) return(0) else return(20*log(5/x))
emissions(model)<-createEM(c(10,10), tws, S)
emissions(model)

MobilePhoneESSnetBigData/destim documentation built on Dec. 7, 2020, 7:35 p.m.