Calculates the conditional entropy of a node given other nodes in a Bayesian network. Only works for discrete valued distributions fitted on data where variables are non-ordered factors class ("bn.fit.dnet"). Uses gRain package to convert to query the Bayesian network.
1 | conditional_entropy_query(node, conditioning_nodes, bn_model, base = exp(1))
|
node |
name of the node of interest |
bn_model |
a fitted Bayesian network, an object of the class bn.fit |
base |
the base used in entropy's logarithm calculation. By setting base equal to the number of levels of the node variable, maximum entropy will be 1. Set to 2 for entropy units in bits. |
vector |
of node names to condition on. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.