CD {bnmonitor} | R Documentation |
Chan-Darwiche (CD) distance between a Bayesian network and its update after parameter variation.
CD( bnfit, node, value_node, value_parents, new_value, covariation = "proportional" )
bnfit |
object of class |
node |
character string. Node of which the conditional probability distribution is being changed. |
value_node |
character string. Level of |
value_parents |
character string. Levels of |
new_value |
numeric vector with elements between 0 and 1. Values to which the parameter should be updated. It can take a specific value or more than one. In the case of more than one value, these should be defined through a vector with an increasing order of the elements. |
covariation |
character string. Co-variation scheme to be used for the updated Bayesian network. Can take values |
The Bayesian network on which parameter variation is being conducted should be expressed as a bn.fit
object.
The name of the node to be varied, its level and its parent's levels should be specified.
The parameter variation specified by the function is:
P ( node
= value_node
| parents = value_parents
) = new_value
The CD distance between two probability distributions P and P' defined over the same sample space \mathcal{Y} is defined as
CD(P,P')= \log\max_{y\in\mathcal{Y}}≤ft(\frac{P(y)}{P'(y)}\right) - \log\min_{y\in\mathcal{Y}}≤ft(\frac{P(y)}{P'(y)}\right)
The function CD
returns a dataframe including in the first column the variations performed, and in the following columns the corresponding CD distances for the chosen co-variation schemes.
Chan, H., & Darwiche, A. (2005). A distance measure for bounding probabilistic belief change. International Journal of Approximate Reasoning, 38(2), 149-174.
Renooij, S. (2014). Co-variation for sensitivity analysis in Bayesian networks: Properties, consequences and alternatives. International Journal of Approximate Reasoning, 55(4), 1022-1042.
CD(synthetic_bn, "y2", "1", "2", "all", "all") CD(synthetic_bn, "y1", "2", NULL, 0.3, "all")