influential_obs {bnmonitor}R Documentation

Influential observations

Description

Influence of a single observation to the global monitor

Usage

influential_obs(dag, data, alpha = "default")

Arguments

dag

an object of class bn from the bnlearn package

data

a base R style dataframe

alpha

single integer. By default, the number of max levels in data

Details

Consider a Bayesian network over variables Y1,,YmY_1,\dots,Y_m and suppose a dataset (y1,,yn)(\boldsymbol{y}_1,\dots,\boldsymbol{y}_n) has been observed, where yi=(yi1,,yim)\boldsymbol{y}_i=(y_{i1},\dots,y_{im}) and yijy_{ij} is the i-th observation of the j-th variable. Define yi=(y1,,yi1,yi+1,,yn)\boldsymbol{y}_{-i}=(\boldsymbol{y}_1,\dots,\boldsymbol{y}_{i-1},\boldsymbol{y}_{i+1},\dots,\boldsymbol{y}_n). The influence of an observation to the global monitor is defined as

log(p(y1,,yn))log(p(yi)).|\log(p(\boldsymbol{y}_1,\dots,\boldsymbol{y}_n)) - \log(p(\boldsymbol{y}_{-i}))|.

High values of this index denote observations that highly contribute to the likelihood of the model.

Value

A vector including the influence of each observation.

See Also

influential_obs, node_monitor, seq_node_monitor, seq_pa_ch_monitor

Examples

influential_obs(chds_bn, chds[1:100,], 3)


[Package bnmonitor version 0.2.0 Index]