Learn R Programming

h2o (version 3.44.0.3)

h2o.negative_log_likelihood: Extracts the final training negative log likelihood of a GLM model.

Description

Extracts the final training negative log likelihood of a GLM model.

Usage

h2o.negative_log_likelihood(model)

Value

The final training negative log likelihood of a GLM model.

Arguments

model

an H2OModel object.

Examples

Run this code
if (FALSE) {
library(h2o)
h2o.init()

f <- "https://s3.amazonaws.com/h2o-public-test-data/smalldata/junit/cars_20mpg.csv"
cars <- h2o.importFile(f)
predictors <- c("displacement", "power", "weight", "acceleration", "year")
response <- "acceleration"
cars_model <- h2o.glm(y=response, 
                       x=predictors, 
                       training_frame = cars, 
                       family="gaussian",
                       generate_scoring_history=TRUE)
nllValue <- h2o.negative_log_likelihood(cars_model)
}

Run the code above in your browser using DataLab