h2o.loglikelihood | R Documentation |
Retrieves the log likelihood value. If "train", "valid", and "xval" parameters are FALSE (default), then the training log likelihood value is returned. If more than one parameter is set to TRUE, then a named vector of log likelihoods is returned, where the names are "train", "valid" or "xval".
h2o.loglikelihood(object, train = FALSE, valid = FALSE, xval = FALSE)
object |
An H2OModel or H2OModelMetrics. |
train |
Retrieve the training log likelihood |
valid |
Retrieve the validation log likelihood |
xval |
Retrieve the cross-validation log likelihood |
## Not run:
library(h2o)
h2o.init()
prostate_path <- system.file("extdata", "prostate.csv", package = "h2o")
prostate <- h2o.uploadFile(path = prostate_path)
p_sid <- h2o.runif(prostate)
prostate_train <- prostate[p_sid > .2,]
prostate_glm <- h2o.glm(x = 3:7, y = 2, training_frame = prostate_train)
ll_basic <- h2o.loglikelihood(prostate_glm)
print(ll_basic)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.