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>: MultilayerPerceptron
#> * Model: -
#> * Parameters: list()
#> * Packages: mlr3, RWeka
#> * Predict Types: [response]
#> * Feature Types: logical, integer, numeric, factor, ordered
#> * Properties: missings
# 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.022113282127482547
#> Node 1 0.2557093842144147
#> Node 2 -1.0536359659615149
#> Node 3 2.572692905857619
#> Node 4 0.32757601891993166
#> Node 5 -1.3402606542191344
#> Sigmoid Node 1
#> Inputs Weights
#> Threshold -1.1472722416401655
#> Attrib am 0.24823704333080127
#> Attrib carb 0.19640832220228036
#> Attrib cyl -0.0019916954179373604
#> Attrib disp 0.2656243080606898
#> Attrib drat 0.22258747880004034
#> Attrib gear 0.06853180474282601
#> Attrib hp 0.31892201137461207
#> Attrib qsec 0.21636067595323752
#> Attrib vs 0.18979191547680258
#> Attrib wt -0.01662644627341368
#> Sigmoid Node 2
#> Inputs Weights
#> Threshold -0.3375245496929146
#> Attrib am -0.4625441716309757
#> Attrib carb 1.3839334023317367
#> Attrib cyl 0.3865004824615012
#> Attrib disp -1.003605679210137
#> Attrib drat 0.06772489674818413
#> Attrib gear 0.5826203457896266
#> Attrib hp -0.5693435731318803
#> Attrib qsec -0.3898040693050207
#> Attrib vs -0.6898020624398125
#> Attrib wt 0.37084268435540574
#> Sigmoid Node 3
#> Inputs Weights
#> Threshold -2.2558293341131077
#> Attrib am 0.5268187539299777
#> Attrib carb 1.7921399841937413
#> Attrib cyl -0.1001297241506174
#> Attrib disp -0.11241442781997374
#> Attrib drat 0.35121508285722935
#> Attrib gear 2.1857368924163962
#> Attrib hp -0.15262618751967455
#> Attrib qsec 2.5458176469346374
#> Attrib vs 0.02077506845002941
#> Attrib wt -0.2790330848072306
#> Sigmoid Node 4
#> Inputs Weights
#> Threshold -1.2254678191946315
#> Attrib am 0.3867238095891085
#> Attrib carb 0.2626556203089563
#> Attrib cyl 0.05706892850640662
#> Attrib disp 0.27684244414318987
#> Attrib drat 0.36430203467793204
#> Attrib gear -0.03982989769604959
#> Attrib hp 0.4152687672894403
#> Attrib qsec 0.3974728786519584
#> Attrib vs 0.07849288950402282
#> Attrib wt -0.009198027795271752
#> Sigmoid Node 5
#> Inputs Weights
#> Threshold -1.6683823716273836
#> Attrib am 0.3846586487197185
#> Attrib carb 1.429903784021742
#> Attrib cyl 0.44145702358715583
#> Attrib disp 0.7716049907048158
#> Attrib drat -1.2261889482645092
#> Attrib gear 0.9839147239812467
#> Attrib hp -0.8681533856606424
#> Attrib qsec 0.8182827128972197
#> Attrib vs 0.10491812597259188
#> Attrib wt 0.6867435045416281
#> 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
#> 52.5294