gen_emis {dagHMM} | R 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 model2network 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)
[Package dagHMM version 0.1.1 Index]