Regression MultilayerPerceptron Learner
mlr_learners_regr.multilayer_perceptron.Rd
Regressor that uses backpropagation to learn a multi-layer perceptron.
Calls RWeka::make_Weka_classifier()
from RWeka.
Custom mlr3 parameters
output_debug_info
:original id: output-debug-info
do_not_check_capabilities
:original id: do-not-check-capabilities
num_decimal_places
:original id: num-decimal-places
batch_size
:original id: batch-size
Reason for change: This learner contains changed ids of the following control arguments since their ids contain irregular pattern
G
removed:GUI will be opened
Reason for change: The parameter is removed because we don't want to launch GUI.
Parameters
Id | Type | Default | Levels | Range |
subset | untyped | - | - | |
na.action | untyped | - | - | |
L | numeric | 0.3 | \([0, 1]\) | |
M | numeric | 0.2 | \([0, 1]\) | |
N | integer | 500 | \([1, \infty)\) | |
V | numeric | 0 | \([0, 100]\) | |
S | integer | 0 | \([0, \infty)\) | |
E | integer | 20 | \([1, \infty)\) | |
A | logical | FALSE | TRUE, FALSE | - |
B | logical | FALSE | TRUE, FALSE | - |
H | untyped | "a" | - | |
C | logical | FALSE | TRUE, FALSE | - |
I | logical | FALSE | TRUE, FALSE | - |
R | logical | FALSE | TRUE, FALSE | - |
D | logical | FALSE | TRUE, FALSE | - |
output_debug_info | logical | FALSE | TRUE, FALSE | - |
do_not_check_capabilities | logical | FALSE | TRUE, FALSE | - |
num_decimal_places | integer | 2 | \([1, \infty)\) | |
batch_size | integer | 100 | \([1, \infty)\) | |
options | untyped | NULL | - |
See also
as.data.table(mlr_learners)
for a table of available Learners in the running session (depending on the loaded packages).Chapter in the mlr3book: https://mlr3book.mlr-org.com/basics.html#learners
mlr3learners for a selection of recommended learners.
mlr3cluster for unsupervised clustering learners.
mlr3pipelines to combine learners with pre- and postprocessing steps.
mlr3tuning for tuning of hyperparameters, mlr3tuningspaces for established default tuning spaces.
Super classes
mlr3::Learner
-> mlr3::LearnerRegr
-> LearnerRegrMultilayerPerceptron
Examples
# Define the Learner
learner = mlr3::lrn("regr.multilayer_perceptron")
print(learner)
#>
#> ── <LearnerRegrMultilayerPerceptron> (regr.multilayer_perceptron): MultilayerPer
#> • Model: -
#> • Parameters: list()
#> • Packages: mlr3 and RWeka
#> • Predict Types: [response]
#> • Feature Types: logical, integer, numeric, factor, and ordered
#> • Encapsulation: none (fallback: -)
#> • Properties: missings
#> • Other settings: use_weights = 'error'
# Define a Task
task = mlr3::tsk("mtcars")
# Create train and test set
ids = mlr3::partition(task)
# Train the learner on the training ids
learner$train(task, row_ids = ids$train)
print(learner$model)
#> Linear Node 0
#> Inputs Weights
#> Threshold -0.27658305028520547
#> Node 1 0.8469912545862693
#> Node 2 -1.6852974596809058
#> Node 3 1.5570163430002895
#> Node 4 1.335541358415677
#> Node 5 -0.4039224612290253
#> Sigmoid Node 1
#> Inputs Weights
#> Threshold -1.0044917951524297
#> Attrib am -0.1094655336782831
#> Attrib carb 0.2526289929910076
#> Attrib cyl -0.40875675952012436
#> Attrib disp 0.7382163498896149
#> Attrib drat 0.6875794539959842
#> Attrib gear -0.4189289389251374
#> Attrib hp 0.38945471802337484
#> Attrib qsec -0.04828058275488435
#> Attrib vs 0.0175242844714998
#> Attrib wt 0.4045560030037958
#> Sigmoid Node 2
#> Inputs Weights
#> Threshold -1.3054215723166336
#> Attrib am -0.10173176271082028
#> Attrib carb 1.2283983504305562
#> Attrib cyl 0.9161844128592822
#> Attrib disp 0.319758749669592
#> Attrib drat -1.7460159326428237
#> Attrib gear 1.5884060429038862
#> Attrib hp -0.354369950417324
#> Attrib qsec -0.05865682152860223
#> Attrib vs 0.4425949704031995
#> Attrib wt 1.2997330357081411
#> Sigmoid Node 3
#> Inputs Weights
#> Threshold -1.6178700118903588
#> Attrib am 0.8627326582399635
#> Attrib carb 0.9864767643990782
#> Attrib cyl -0.9835492747706772
#> Attrib disp -0.4358867571821705
#> Attrib drat 0.24531063369974665
#> Attrib gear 0.8195577620654009
#> Attrib hp 1.056089912670927
#> Attrib qsec 1.4191254593774616
#> Attrib vs 0.5024076016340825
#> Attrib wt 0.8490025084796262
#> Sigmoid Node 4
#> Inputs Weights
#> Threshold -1.4024449423572305
#> Attrib am 0.946395811639127
#> Attrib carb 0.923718297008592
#> Attrib cyl -0.9529260575391052
#> Attrib disp -0.3776451665459604
#> Attrib drat -0.2680632925829612
#> Attrib gear 0.6693624038680632
#> Attrib hp 1.0186621686914727
#> Attrib qsec 1.161472596757883
#> Attrib vs 0.2271580805477153
#> Attrib wt 0.6728148897907154
#> Sigmoid Node 5
#> Inputs Weights
#> Threshold -1.3086663787325548
#> Attrib am -0.3356710373893209
#> Attrib carb 0.49162912337541154
#> Attrib cyl 0.011005571250425308
#> Attrib disp 0.11216431729395367
#> Attrib drat -0.7486993845229463
#> Attrib gear -0.025236183959187076
#> Attrib hp -0.3177208502825204
#> Attrib qsec 0.17497596543902041
#> Attrib vs 0.3819237684808749
#> Attrib wt 0.3904391222394063
#> Class
#> Input
#> Node 0
#>
# Make predictions for the test rows
predictions = learner$predict(task, row_ids = ids$test)
# Score the predictions
predictions$score()
#> regr.mse
#> 40.68853