MutualInfo {RNetica} | R Documentation |
The mutual information is a measure of how closely related one node is
to another, i.e., how much information each node in nodelist
provides about the target
node. The expression
MutualInfo(target, nodelist)
calculates the mutual
information of each node in nodelist
with target
.
The function VarianceOfReal()
is similar, but instead it
measures the reduction in variance of the target. The target
node must be continuous or have numeric values assigned to all levels
using NodeLevels
.
MutualInfo(target, nodelist) VarianceOfReal(target, nodelist)
target |
An active |
nodelist |
A non-empty list of active |
The mutual information between two discrete variables is defined as:
MI(X,Y) = ∑_{x,y} \Pr(x,y) \log \frac{ \Pr(x,y) }{\Pr(x)\Pr(y)}.
It is a measure of how much information X
provides about
Y
. This measure is appropriate when both X
and Y
are discrete variables.
Mutual information is often used to select the next best variable to test (in the educational context, this would be the next item to select for an adaptive test). The highest value of the mutual information will provide the most information. (See Chapter 7 of Almond et al, 2015).
The function VarianceOfReal(target,nodelist)
is
related, but in this case target
must either be continuous
(is.continuous(target)
is true) or have numeric
values assigned to each level using NodeLevels(target)
.
For this function, the value returned is the amount by which the
variance of target
is expected to be reduced if the value of
the observable node in the nodelist was learned. Again, higher values
indicate better information.
Returns a named numeric vector with the names corresponding to the
nodes in nodelist
and the value the mutual information or
variance reduction.
Russell Almond
http://norsys.com/onLineAPIManual/index.html: MutualInfo_bn(), VarianceOfReal_bn()
Almond, R. G., Mislevy, R. J., Steinberg, L. S., Yan, D. & Williamson, D. M. (2015) Bayesian Networks in Educational Assessment. Springer.
is.continuous()
, NodeExpectedValue()
,
NodeLevels()
,
The function ewoe
returns the expected weight of
evidence which is a similar metric.
sess <- NeticaSession() startSession(sess) irt5 <- ReadNetworks(file.path(library(help="RNetica")$path, "sampleNets","IRT5.dne"), session=sess) irt5.theta <- NetworkFindNode(irt5,"Theta") irt5.x <- NetworkFindNode(irt5,paste("Item",1:5,sep="_")) CompileNetwork(irt5) MutualInfo(irt5.theta,irt5.x) VarianceOfReal(irt5.theta,irt5.x) DeleteNetwork(irt5) stopSession(sess)