sensitivity returns the sensitivity function for a probabilistic query of interest with respect to a parameter change defined by the user.
sensitivity(
bnfit,
interest_node,
interest_node_value,
evidence_nodes = NULL,
evidence_states = NULL,
node,
value_node,
value_parents,
new_value,
covariation = "proportional"
)A dataframe with the varied parameter values and the output probabilities for the co-variation schemes selected. If plot = TRUE the function also returns a plot of the sensitivity function.
object of class bn.fit.
character string. Node of the probability query of interest.
character string. Level of interest_node.
character string. Evidence nodes. If NULL no evidence is considered. Set by default to NULL.
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.
character string. Node of which the conditional probability distribution is being changed.
character string. Level of node.
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.
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. For 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 is considered.
character string. Co-variation 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 are considered. Set by default to proportional.
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
and the probabilistic query of interest is:
P ( interest_node = interest_node_value | evidence_nodes = evidence_states )
Coupé, V. M., & Van Der Gaag, L. C. (2002). Properties of sensitivity analysis of Bayesian belief networks. Annals of Mathematics and Artificial Intelligence, 36(4), 323-356.
Leonelli, M., Goergen, C., & Smith, J. Q. (2017). Sensitivity analysis in multilinear probabilistic models. Information Sciences, 411, 84-97.
covariation, sensquery
sensitivity(synthetic_bn, "y2", "3", node = "y1",value_node = "1",
value_parents = NULL, new_value = "all", covariation = "all")
sensitivity(synthetic_bn, "y3", "1", "y2", "1", node = "y1", "1", NULL, 0.9, "all")
Run the code above in your browser using DataLab