if (FALSE) {
library(h2o)
h2o.init()
# Import the wine dataset into H2O:
df <- h2o.importFile("h2o://prostate.csv")
# Set the response
response <- "CAPSULE"
df[[response]] <- as.factor(df[[response]])
# Split the dataset into a train and test set:
splits <- h2o.splitFrame(df, ratios = 0.8, seed = 1)
train <- splits[[1]]
test <- splits[[2]]
# Build and train the model:
aml <- h2o.automl(y = response,
training_frame = train,
max_models = 10,
seed = 1)
# Create the Pareto front
pf <- h2o.pareto_front(aml)
plot(pf)
pf@pareto_front # to retrieve the Pareto front subset of the leaderboard
aml2 <- h2o.automl(y = response,
training_frame = train,
max_models = 10,
seed = 42)
combined_leaderboard <- h2o.make_leaderboard(list(aml, aml2), test, extra_columns = "ALL")
pf_combined <- h2o.pareto_front(combined_leaderboard, x_metric = "predict_time_per_row_ms",
y_metric = "rmse", optimum = "bottom left")
plot(pf_combined)
pf_combined@pareto_front
}
Run the code above in your browser using DataLab