influential_obs {bnmonitor}R Documentation

Influential observations

Description

Influence of a single observation to the global monitor

Usage

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

Arguments

dag

an object of class bn from the bnlearn package

df

a base R style dataframe

alpha

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

Details

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

|\log(p(\boldsymbol{y}_1,…,\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.1.1 Index]