global_monitor {bnmonitor}R Documentation

Global monitor

Description

Contribution of each vertex of a Bayesian network to the global monitor

Usage

global_monitor(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, 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. The global monitor is defined as the negative log-likelihood of the model, i.e.

-\log(p(\boldsymbol{y}_1,…,\boldsymbol{y}_n))= - ∑_{j=1}^m∑_{i=1}^n \log(p(y_{ij} | π_{ij})),

where π_{ij} is the value of the parents of Y_j for the i-th observation. The contribution of the j-th vertex to the global monitor is thus

-∑_{i=1}^n\log(p(y_{ij}|π_{ij})).

Value

A dataframe including the name of the vertices and the contribution of the vertices to the global monitor. It also returns a plot where vertices with higher contributions in absolute value are darker.

References

Cowell, R. G., Dawid, P., Lauritzen, S. L., & Spiegelhalter, D. J. (2006). Probabilistic networks and expert systems: Exact computational methods for Bayesian networks. Springer Science & Business Media.

Cowell, R. G., Verrall, R. J., & Yoon, Y. K. (2007). Modeling operational risk with Bayesian networks. Journal of Risk and Insurance, 74(4), 795-827.

See Also

influential_obs, node_monitor, seq_node_monitor, seq_pa_ch_monitor

Examples

global_monitor(chds_bn, chds, 3)


[Package bnmonitor version 0.1.1 Index]