Closed topepo closed 2 years ago
The changes in h2o_train()
would look something like
h2o_train <- function(x, y, weights = NULL, model, ...) { # new arg
opts <- get_fit_opts(...)
x <- as.data.frame(x)
x_names <- names(x)
x$.outcome <- y
x$.weights <- weights # new
x <- as_h2o(x)$data
Then, since we named the new argument 'weights', the model function def just has to change
protect = c("x", "y"),
to
protect = c("x", "y", "weights"),
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.
The h2o functions take weights in the argument
weights_column
that is described as "Column with observation weights".