alpha_function: Normalized Forward Probability function EM

Description Usage Arguments Value

View source: R/General_functions.R

Description

This function calculates the normalized forward probability of the HMM states. The probabilities are implemented by calculating first the forward probabilities of each step and then they are weighted such that the sum of probabilities are equal to one. This procedure is done to prevent the threat of underflow. In the general literatur the forward probabilities are also revered to as alpha matrix.

Usage

1
alpha_function(m, N, delta, Gamma, p, set)

Arguments

m

number of likelihoods

N

length of the supplied dataset

delta

Delta vector

Gamma

Gamma matrix

p

vector of likelihood probabilities of the dataset

set

index vector to align the p vector

Value

Returns a list of parameters. The first list are the normalised alphas as a matrix with the dimension m as columns and the datapoints t as rows. The second part of the list are the corresponding weights.


pneff93/HMM documentation built on Oct. 26, 2019, 8:16 a.m.