Skip to contents

sensquery returns, for a given change in a probability of interest, the parameters' changes to achieve it together with the corresponding CD distances.

Usage

sensquery(
  bnfit,
  interest_node,
  interest_node_value,
  new_value,
  evidence_nodes = NULL,
  evidence_states = NULL
)

Arguments

bnfit

object of class bn.fit.

interest_node

character string. Node of the probability query of interest.

interest_node_value

character string. Level of interest_node.

new_value

numeric value between 0 and 1. New value of the probability of interest.

evidence_nodes

character string. Evidence nodes. Set by default to NULL.

evidence_states

character string. Levels of evidence_nodes. If NULL no evidence is considered. If evidence_nodes="NULL", evidence_states should be set to NULL. Set by default to NULL.

Value

A dataframe with the following columns: node - the vertex of the proposed change; Value node - the level of node to be changed; Value parents - the levels of the parent variables of node; Original value - the original probability defined by Node, Value node and Value parents; Suggested change - the new proposed value for the probability defined by Node, Value node and Value parents; CD distance - the CD distance between the original and new network with the Suggested change.

Details

The Bayesian network should be expressed as a bn.fit object. The name of the node of the probability of interest, its level and the new value should be specified. Evidence could be also indicated. The probability of interest is specified as follows:

P ( interest_node = interest_node_value | evidence_nodes = evidence_states ) = new_value

Only the proportional co-variation scheme is used.

References

Chan, H., & Darwiche, A. (2002). When do numbers really matter?. Journal of artificial intelligence research, 17, 265-287.

See also

Examples

sensquery(synthetic_bn,"y3", "3", 0.3)
#>   Node Value node Value parents Original value Suggested change CD distance
#> 1   y1          2                          0.3        0.6236559    1.352393
#> 2   y2          3             1            0.5        0.9479167    2.901422
#> 3   y3          1           2,1            0.1        0.8166667    3.691150