View source: R/NormalBlockBase-S3methods.R
| logLik.NormalBlockBase | R Documentation |
Returns the (variational) log-likelihood of a fitted
normal-block model as a "logLik" object, compatible with stats::AIC()
and stats::BIC().
## S3 method for class 'NormalBlockBase'
logLik(object, ...)
object |
An object of class NormalBlockBase. |
... |
not used, only here for S3 compatibility |
An object of class "logLik". The numeric value is the
log-likelihood or its variational lower bound (ELBO), on the scale of the
data the model was fitted on (rescaled or not, see NormalBlockData); use
the heldout_loglik() method for a log-likelihood on Y's original scale.
Attributes df and nobs hold the number of parameters and observations.
ex_data <- generate_normal_block_var_data(n = 50, p = 20, d = 1, q = 3)
data <- NormalBlockData$new(ex_data$Y, ex_data$X)
model <- normal_block(data, blocks = 3, control = NB_control(verbose = FALSE))
logLik(model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.