compute_logLik: Compute logLik contributions for exact response

View source: R/compute_logLik.R

compute_logLikR Documentation

Compute logLik contributions for exact response

Description

Compute logLik contributions for exact response

Usage

compute_logLik(gammas, beta = NULL, eta = NULL, y_train, distr = k_sigmoid)

Examples

gammas <- matrix(c(-1, -1, -1, -1, -2, -1, -1, -1), nrow = 2, byrow = TRUE)
gammas <- tf$Variable(gammas, dtype = "float32")
beta <- tf$constant(c(1, -1), dtype = "float32")
eta <- tf$constant(c(-1, -2), dtype = "float32")
y_train <- matrix(c(0, 0, 0, 1, 0, 1, 0, 0, 0, 0), nrow = 2, byrow = TRUE)
y_train <- tf$constant(y_train, dtype = "float32")
compute_logLik(gammas = gammas, beta = beta, eta = eta, y_train = y_train)

gammas <- matrix(c(-1, -1, -1, -1), nrow = 1, byrow = TRUE)
gammas <- tf$Variable(gammas, dtype = "float32")
beta <- tf$constant(c(1, -1), dtype = "float32")
eta <- tf$constant(c(-1, -2), dtype = "float32")
y_train <- matrix(c(0, 0, 0, 1, 0, 1, 0, 0, 0, 0), nrow = 2, byrow = TRUE)
y_train <- tf$constant(y_train, dtype = "float32")
compute_logLik(gammas = gammas, beta = beta, eta = eta, y_train = y_train)

LucasKookUZH/ontram-pkg documentation built on March 27, 2023, 6:05 p.m.