CD_distance: CD-distance

Description Usage Arguments Details See Also

View source: R/CD_distance.R

Description

CD_distance returns the Chan-Darwiche distance between a Bayesian network and its update after parameter variation.

Usage

1
2
CD_distance(bnfit, node, value_node, value_parents, new_value,
  covariation = "proportional", plot = TRUE, ...)

Arguments

bnfit

object of class bn.fit

node

character string. Node of which the conditional probability distribution is being changed.

value_node

character string. Level of node.

value_parents

character string. Levels of node's parents. The levels should be defined according to the order of the parents in bnfit[[node]][["parents"]]. If node has no parents, then should be set to NULL.

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 in which the user wants to consider more than one value,these should be defined through a vector with an increasing order of the elements. new_value can also take as value the character string all: in this case a sequence of possible parameter changes ranging from 0.05 to 0.95 will be considered.

covariation

character string. Covariation scheme to be used for the updated Bayesian network. Can take values uniform, proportional, orderp, all.If equal to all, uniform, proportional and order-preserving co-variation schemes will be considered. Set by default to proportional.

plot

boolean value. If TRUE the function returns a plot. If covariation = "all", CD-distance for uniform (red), proportional (green), order-preserving (blue) co-variation schemes will be plotted. Set by default to TRUE.

...

additional parameters to be added to the plot.

Details


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 level should be specified. The parameter variation specified by the function is:

P ( node = value_node | parents = value_parents ) = new_value

See Also

Other dissimilarity measures: KL


rramsiya/bnsens documentation built on Sept. 30, 2020, 3:28 p.m.