cnLoglik-method | R Documentation |
Calculate the log-likelihood of a sample with respect to a given catNetwork
object
cnLoglik(object, data, perturbations=NULL, bysample=FALSE)
object |
a |
data |
a data |
perturbations |
a binary |
bysample |
a |
If bysample
is set to TRUE, the function output is a vector of log-likelihoods of the individual sample records. Otherwise, the total average of the log-likelihood of the sample is reported.
A numeric value
N. Balov
cnNodeLoglik
library(catnet) cnet <- cnRandomCatnet(numnodes=10, maxParents = 3, numCategories = 2) psamples <- cnSamples(object=cnet, numsamples=100) cnLoglik(object=cnet, data=psamples)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.