powered by
For a given data sample, the function calculates the log-likelihood of a node with respect to a specified parent set.
cnNodeLoglik(object, node, data, pert=NULL, softmode=FALSE, klmode=FALSE)
a catNetwork object
catNetwork
an integer or a list of integers, node indices in the data
integer
list
data
a matrix or data.frame of categories
matrix
data.frame
an optional perturbation matrix or data.frame
a logical, turns on/off the soft quantization mode
logical
a logical, use the negative KL-distance or the log-likelihood
a numeric value
numeric
cnLoglik
# NOT RUN { cnet <- cnRandomCatnet(numnodes=10, maxpars=3, numcats=2) psamples <- cnSamples(object=cnet, numsamples=100) cnNodeLoglik(cnet, node=5, data=psamples) # }
Run the code above in your browser using DataLab