nllik {dgpsi} R Documentation

Calculate negative predicted log-likelihood

Description

This function computes the negative predicted log-likelihood from a DGP emulator with a likelihood layer.

Usage

nllik(object, x, y)


Arguments

 object an instance of the dgp class and it should be produced by dgp() with one of the following two settings: if struc = NULL, likelihood is not NULL; if a customized structure is provided to struc, the final layer must be likelihood layer containing only one likelihood node produced by Poisson(), Hetero(), or NegBin(). x a matrix where each row is an input testing data point and each column is an input dimension. y a matrix with only one column where each row is a scalar-valued testing output data point.

Details

See further examples and tutorials at https://mingdeyu.github.io/dgpsi-R/.

Value

An updated object is returned with an additional slot named NLL that contains two elements. The first one, named meanNLL, is a scalar that gives the average negative predicted log-likelihood across all testing data points. The second one, named allNLL, is a vector that gives the negative predicted log-likelihood for each testing data point.

Note

Any R vector detected in x and y will be treated as a column vector and automatically converted into a single-column R matrix.

Examples

## Not run:

# Check https://mingdeyu.github.io/dgpsi-R/ for examples
# on how to compute the negative predicted log-likelihood
# using nllik().

## End(Not run)


[Package dgpsi version 2.1.5 Index]