gen_emis: Generating the inital emission probability distribution of...

View source: R/initHMM.R

gen_emisR Documentation

Generating the inital emission probability distribution of the covariates in TAN structure.

Description

Generating the inital emission probability distribution of the covariates in TAN structure.

Usage

gen_emis(net, observation, sym)

Arguments

net

Object of type 'bn' provided as output by bnlearnmodel2network showing the TAN structure between target variable and covariates.

observation

Dataframe containing the discritized character values of only covariates at each node. Column names of dataframe should be same as the covariate names. Missing values should be denoted by "NA".

sym

Character vector of possible values of target variable

Value

Inital emission probability distribution of the covariates in TAN structure

Examples


library(bnlearn)

bnet = model2network("[A][C|A:B][D|A:C][B|A]") #A is the target variable while
                                               #B, C and D are covariates
obsvA=data.frame(list(B=c("L","H","H","L","L"),C=c("H","H","L","L","H"),D=c("L","L","L","H","H")))
target_value= c("P","N")
prob= gen_emis(net=bnet,observation=obsvA,sym=target_value)

dagHMM documentation built on Jan. 11, 2023, 1:13 a.m.

Related to gen_emis in dagHMM...