In my opinion a good starting point for modeling with h2o is using h2o.automl() function and then you can manually fine tune a final model. The general pattern for training a model with h2o is as follows
library(h2o)
h2o.init()
# Convert your dataframes to h2o objects
train <- as.h2o(train)
valid <- as.h2o(valid)
test <- as.h2o(test)
# Set variable names
y <- "dependent_variable"
x <- setdiff(names(train), y)
# Automatic model training
# You can force Deep Learning by excluding the other algorithms with exclude_algos parameter
models <- h2o.automl(x, y,
training_frame = train,
validation_frame = valid,
leaderboard_frame = test,
stopping_metric = "deviance",
seed = 12345,
exclude_algos = c("GLM", "DRF", "XGBoost", "GBM", "StackedEnsemble"))
# Chossing the best model (relative to the stopping metric)
best_model <- models@leader
# Prepare new data and forecasting
new_data <- as.h2o(new_data)
predictions <- h2o.predict(best_model, new_data)
After that you could fine tune your model replacing h2o.automl() with h2o.deeplearning() and manually setting the parameters.