initparams: Initializer for HMM objects

Description Usage Arguments Value See Also Examples

View source: R/initparams.R

Description

Sets initial parameters for a HMM object, as specified. The field parameters of the HMM object, which includes both initial state and transition probabilities, is initialized at random.

The initial states probabilities are set to an uniform (0,1) distribution and then divided by their sum.

The initial probabilities of transition are also set to an uniform (0,1) and in this case, projected on the constrained space. After the projection some probability might result greater than one or less than zero. Those probabilities are then set to uniform (0,1) again and the process is repeated until all probabilities of transition are in (0,1) and the constraints are satisfied.

Usage

1

Arguments

x

A HMM object.

Value

An initialized HMM object.

See Also

HMM, minparams, initsteady

Examples

1
2
3
model <- HMMrectangle(3,3)
model <- initparams(model)
range(constraints(model) %*% c(ptransition(model), -1)) # It should be close to zero

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