EnterFindings {RNetica}R Documentation

Enters findings for multiple nodes in a Netica network.

Description

This function takes two arguments, a network and a list of nodes and the corresponding findings. It sets all of the findings at once.

Usage

EnterFindings(net, findings)

Arguments

net

An active and compiled NeticaBN.

findings

An integer or character vector giving the findings. The names(findings) should be names of nodes in net. The values of findings should be corresponding states either expressed as a character string or as an integer index into the list of states for that node. (See NodeFinding(node).

Details

This function enters findings for multiple nodes at the same time. It offers two improvements over repeated calls to NodeFinding(). First, it finds the nodes by name in the network, making it easier to work with data in the form of key–value pairs that might come from other systems. Second, it wraps the calls to NodeFinding() in a call to WithoutAutoUpdate() which should only propagate the new findings after all values have been entered.

Value

The value of net is returned invisibly.

Author(s)

Russell Almond

See Also

NeticaBN, NodeBeliefs(), EnterNegativeFinding(), NodeFinding(), RetractNodeFinding(), NodeLikelihood(), EnterGaussianFinding(), EnterIntervalFinding(), JointProbability(), NodeValue(), MostProbableConfig(), FindingsProbability()

Examples

sess <- NeticaSession()
startSession(sess)

Motif <- ReadNetworks(file.path(library(help="RNetica")$path,
                           "sampleNets","EMSMMotif.dne"), session=sess)

CompileNetwork(Motif)
obs <- c(Obs1a1="Right",Obs1a2="Wrong",
         Obs1b1="Right",Obs1b2="Wrong",
         Obs2a="Half", Obs2b="Half")

EnterFindings(Motif,obs)
JointProbability(NetworkNodesInSet(Motif,"Proficiency"))

DeleteNetwork(Motif)
stopSession(sess)

[Package RNetica version 0.8-4 Index]