Learn R Programming

bnmonitor (version 0.2.2)

diameter: Diameters in a Bayesian network

Description

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

Usage

diameter(bnfit)

Value

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

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)|.$$

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

Run this code
diameter(travel)

Run the code above in your browser using DataLab