x_train <- data.frame(a = c(1, 2, NA, 4), b = c(10, 11, 12, 13))
fit <- .guard_fit(
x_train,
y = c(0.1, 0.2, 0.3, 0.4),
steps = list(impute = list(method = "median")),
task = "gaussian"
)
x_new <- data.frame(a = c(NA, 5), b = c(9, 14))
out <- predict_guard(fit, x_new)
out
Run the code above in your browser using DataLab