Skip to contents

Regression feed-forward multilayer artificial neural network learner. Class h2o::h2o.deeplearning() from package h2o.

Dictionary

This Learner can be instantiated via lrn():

lrn("regr.h2o.deeplearning")

Meta Information

  • Task type: “regr”

  • Predict Types: “response”

  • Feature Types: “integer”, “numeric”, “factor”

  • Required Packages: mlr3, mlr3extralearners, h2o

Parameters

IdTypeDefaultLevelsRange
activationcharacterRectifierRectifier, Tanh, TanhWithDropout, RectifierWithDropout, Maxout, MaxoutWithDropout-
adaptive_ratelogicalTRUETRUE, FALSE-
autoencoderlogicalFALSETRUE, FALSE-
average_activationnumeric0\((-\infty, \infty)\)
categorical_encodingcharacterAUTOAUTO, Enum, OneHotInternal, OneHotExplicit, Binary, Eigen, LabelEncoder, SortByResponse, EnumLimited-
checkpointuntypedNULL-
diagnosticslogicalTRUETRUE, FALSE-
distributioncharacterAUTOAUTO, gaussian, poisson, gamma, tweedie, laplace, huber, quantile-
elastic_averaginglogicalFALSETRUE, FALSE-
elastic_averaging_moving_ratenumeric0.9\((-\infty, \infty)\)
elastic_averaging_regularizationnumeric0.001\((-\infty, \infty)\)
epochsnumeric10\([1, \infty)\)
epsilonnumeric1e-08\([1e-10, 1e-04]\)
export_checkpoints_diruntypedNULL-
export_weights_and_biaseslogicalFALSETRUE, FALSE-
fast_modelogicalTRUETRUE, FALSE-
force_load_balancelogicalTRUETRUE, FALSE-
hiddenuntypedc(200L, 200L)-
hidden_dropout_ratiosnumeric0.5\((-\infty, \infty)\)
huber_alphanumeric0.9\([0, 1]\)
ignore_const_colslogicalTRUETRUE, FALSE-
initial_weight_distributioncharacterUniformAdaptiveUniformAdaptive, Uniform, Normal-
initial_weight_scalenumeric1\((-\infty, \infty)\)
input_dropout_rationumeric0\((-\infty, \infty)\)
l1numeric0\((-\infty, \infty)\)
l2numeric0\((-\infty, \infty)\)
losscharacterAutomaticAutomatic, Quantile, Quadratic, Absolute, Huber-
max_categorical_featuresinteger2147483647\([1, \infty)\)
max_runtime_secsnumeric0\([0, \infty)\)
max_w2numeric3.402823e+38\((-\infty, \infty)\)
mini_batch_sizeinteger1\((-\infty, \infty)\)
missing_values_handlingcharacterMeanImputationMeanImputation, Skip-
momentum_rampnumeric1e+06\((-\infty, \infty)\)
momentum_stablenumeric0\((-\infty, \infty)\)
momentum_startnumeric0\((-\infty, \infty)\)
nesterov_accelerated_gradientlogicalTRUETRUE, FALSE-
overwrite_with_best_modellogicalTRUETRUE, FALSE-
pretrained_autoencoderuntypedNULL-
quantile_alphanumeric0.5\([0, 1]\)
quiet_modelogicalFALSETRUE, FALSE-
ratenumeric0.005\([0, 1]\)
rate_annealingnumeric1e-06\([0, \infty)\)
rate_decaynumeric1\([0, \infty)\)
regression_stopnumeric1e-06\([-1, \infty)\)
replicate_training_datalogicalTRUETRUE, FALSE-
reproduciblelogicalFALSETRUE, FALSE-
rhonumeric0.99\([0, \infty)\)
score_duty_cyclenumeric0.1\((-\infty, \infty)\)
score_each_iterationlogicalFALSETRUE, FALSE-
score_intervalnumeric5\((-\infty, \infty)\)
score_training_samplesinteger10000\((-\infty, \infty)\)
score_validation_samplesinteger0\((-\infty, \infty)\)
seedinteger-1\((-\infty, \infty)\)
shuffle_training_datalogicalFALSETRUE, FALSE-
single_node_modelogicalFALSETRUE, FALSE-
sparselogicalFALSETRUE, FALSE-
sparsity_betanumeric0\((-\infty, \infty)\)
standardizelogicalTRUETRUE, FALSE-
stopping_metriccharacterAUTOAUTO, deviance, MSE, RMSE, MAE, RMSLE-
stopping_roundsinteger5\([0, \infty)\)
stopping_tolerancenumeric0\([0, \infty)\)
target_ratio_comm_to_compnumeric0.05\((-\infty, \infty)\)
train_samples_per_iterationinteger-2\([-2, \infty)\)
tweedie_powernumeric1.5\([1, 2]\)
verboselogicalFALSETRUE, FALSE-

References

Fryda T, LeDell E, Gill N, Aiello S, Fu A, Candel A, Click C, Kraljevic T, Nykodym T, Aboyoun P, Kurka M, Malohlava M, Poirier S, Wong W (2025). h2o: R Interface for the 'H2O' Scalable Machine Learning Platform. R package version 3.46.0.9, https://github.com/h2oai/h2o-3.

See also

Author

awinterstetter

Super classes

mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrH2ODeeplearning

Methods

Inherited methods


Method new()

Creates a new instance of this R6 class.


Method clone()

The objects of this class are cloneable with this method.

Usage

LearnerRegrH2ODeeplearning$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

# Define the Learner
learner = lrn("regr.h2o.deeplearning")
print(learner)
#> 
#> ── <LearnerRegrH2ODeeplearning> (regr.h2o.deeplearning): H2O Deep Learning ─────
#> • Model: -
#> • Parameters: list()
#> • Packages: mlr3, mlr3extralearners, and h2o
#> • Predict Types: [response]
#> • Feature Types: integer, numeric, and factor
#> • Encapsulation: none (fallback: -)
#> • Properties: missings and weights
#> • Other settings: use_weights = 'use'

# Define a Task
task = tsk("mtcars")

# Create train and test set
ids = partition(task)

# Train the learner on the training ids
learner$train(task, row_ids = ids$train)

print(learner$model)
#> Model Details:
#> ==============
#> 
#> H2ORegressionModel: deeplearning
#> Model ID:  DeepLearning_model_R_1774260318250_109 
#> Status of Neuron Layers: predicting mpg, regression, gaussian distribution, Quadratic loss, 42,601 weights/biases, 508.1 KB, 210 training samples, mini-batch size 1
#>   layer units      type dropout       l1       l2 mean_rate rate_rms momentum
#> 1     1    10     Input  0.00 %       NA       NA        NA       NA       NA
#> 2     2   200 Rectifier  0.00 % 0.000000 0.000000  0.008443 0.007981 0.000000
#> 3     3   200 Rectifier  0.00 % 0.000000 0.000000  0.035303 0.126747 0.000000
#> 4     4     1    Linear      NA 0.000000 0.000000  0.015422 0.120246 0.000000
#>   mean_weight weight_rms mean_bias bias_rms
#> 1          NA         NA        NA       NA
#> 2    0.004180   0.100173  0.498222 0.002495
#> 3   -0.000138   0.069275  0.999581 0.001205
#> 4   -0.004985   0.101167  0.000282 0.000000
#> 
#> 
#> H2ORegressionMetrics: deeplearning
#> ** Reported on training data. **
#> ** Metrics reported on full training frame **
#> 
#> MSE:  18.96121
#> RMSE:  4.354447
#> MAE:  3.573819
#> RMSLE:  0.2217358
#> Mean Residual Deviance :  18.96121
#> 
#> 
#> 
#> 


# Make predictions for the test rows
predictions = learner$predict(task, row_ids = ids$test)

# Score the predictions
predictions$score()
#> regr.mse 
#> 10.07329