diameter {bnmonitor}R Documentation

Diameters in a Bayesian network

Description

Computation of the diameters of all conditional probability tables in a Bayesian network.

Usage

diameter(bnfit)

Arguments

bnfit

object of class bn.fit.

Details

The diameter of a conditional probability table P with n rows p_1,\dots,p_n is

d^+(P)=\max_{i,j\leq n} d_V(p_i,p_j),

where d_V is the total variation distance between two probability mass functions over a sample space \mathcal{X}, i.e.

d_V(p_i,p_j)=\frac{1}{2}\sum_{x\in\mathcal{X}}|p_i(x)-p_j(x)|.

Value

A dataframe with the following columns: Nodes - the vertices of the BN; Diameter - the diameters of the associated conditional probability tables.

References

Leonelli, M., Smith, J. Q., & Wright, S. K. (2024). The diameter of a stochastic matrix: A new measure for sensitivity analysis in Bayesian networks. arXiv preprint arXiv:2407.04667.

Examples

diameter(travel)


[Package bnmonitor version 0.2.0 Index]