| BuildTable.NeticaNode | R Documentation | 
The function BuildTable calls
calcDPCFrame to calculate the conditional
probability for a Pnode object, and sets the current
conditional probability table of node to the resulting value.
It also sets the NodeExperience(node) to the
current value of GetPriorWeight(node).
## S4 method for signature 'NeticaNode'
BuildTable(node)
| node | A  | 
The fields of the Pnode object correspond to the
arguments of the calcDPCTable function.  The
output conditional probability table is then set in the node object in
using the [] (Extract.NeticaNode) operator. 
In addition to setting the CPT, the weight given to the nodes in the
EM algorithm are set to GetPriorWeight(node),
which will extract the value of
PnodePriorWeight(node) or if that is null, the
value of
PnetPriorWeight(NodeParents(node))
and set NodeExperience(node) to the resulting value.
The node argument is returned invisibly.
As a side effect the conditional probability table and experience of
node is modified.
Russell Almond
Almond, R. G. (2015) An IRT-based Parameterization for Conditional Probability Tables. Paper presented at the 2015 Bayesian Application Workshop at the Uncertainty in Artificial Intelligence Conference.
Pnode.NeticaNode, Pnode,
PnodeQ,
PnodePriorWeight, PnodeRules, 
PnodeLink, PnodeLnAlphas, 
PnodeAlphas, PnodeBetas, 
PnodeLinkScale,GetPriorWeight,
calcDPCTable,
NodeExperience(node), 
Extract.NeticaNode ([) 
sess <- NeticaSession()
startSession(sess)
## Network with two proficiency variables and observables for each
## different type of rule
binAll <- CreateNetwork("binAll", session=sess)
PnetPriorWeight(binAll) <- 11           #Give it something to see.
## Set up Proficiency Model.
thetas <- NewDiscreteNode(binAll,paste("theta",0:1,sep=""),
                          c("Low","Med","High")) # Create the variable with 3 levels
names(thetas) <- paste("theta",0:1,sep="")
NodeParents(thetas[[2]]) <- thetas[1]
for (nd in thetas) {
  NodeLevels(nd) <- effectiveThetas(NodeNumStates(nd))
  PnodeRules(nd) <- "Compensatory"
  PnodeLink(nd) <- "normalLink"
  PnodeBetas(nd) <- 0 # A numeric vector of intercept parameters
  PnodeQ(nd) <- TRUE # All parents are relevant.
  NodeSets(nd) <- c("pnodes","Proficiency") # A character vector
                   # containing the names of the node sets
}
## Standard normal prior.
PnodeAlphas(thetas[[1]]) <- numeric() # A numeric vector of (log) slope parameters
PnodeLinkScale(thetas[[1]]) <- 1 # A positive numeric value, or NULL
                                 # if the scale parameter is not used
                                 # for the link function.
## Regression with a correlation of .6
PnodeAlphas(thetas[[2]]) <- .6
PnodeLinkScale(thetas[[2]]) <- .8
BuildTable(thetas[[1]])
BuildAllTables(binAll)
DeleteNetwork(binAll)
stopSession(sess)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.