loglik {bnclassify} | R Documentation |
Compute (penalized) log-likelihood.
Description
Compute (penalized) log-likelihood and conditional log-likelihood score of a bnc_bn
object on
a data set. Requires a data frame argument in addition to object
.
Usage
## S3 method for class 'bnc_bn'
AIC(object, ...)
## S3 method for class 'bnc_bn'
BIC(object, ...)
## S3 method for class 'bnc_bn'
logLik(object, ...)
cLogLik(object, ...)
Arguments
object |
A |
... |
A data frame ( |
Details
log-likelihood = ,
Akaike's information criterion (AIC) = ,
The Bayesian information criterion (BIC) score: = ,
where is the number of free parameters in
object
,
is the data set and N is the number of instances in
.
cLogLik
computes the conditional log-likelihood of the model.
Examples
data(car)
nb <- bnc('nb', 'class', car, smooth = 1)
logLik(nb, car)
AIC(nb, car)
BIC(nb, car)
cLogLik(nb, car)
[Package bnclassify version 0.4.8 Index]