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.4405269902112218
#> Node 1 -0.23511745252851315
#> Node 2 -2.8473526464565766
#> Node 3 2.7285987755035657
#> Node 4 0.6341390133108776
#> Node 5 -0.1346381536365994
#> Sigmoid Node 1
#> Inputs Weights
#> Threshold -0.9620519908062624
#> Attrib am 0.18210940969219927
#> Attrib carb 0.6075039667870656
#> Attrib cyl -0.006258726198970353
#> Attrib disp 0.24424200817712083
#> Attrib drat -0.07985758489515213
#> Attrib gear 0.4115700845111302
#> Attrib hp 0.520665039080193
#> Attrib qsec -0.06043542142455634
#> Attrib vs 0.1872992127014772
#> Attrib wt 0.04518138544516684
#> Sigmoid Node 2
#> Inputs Weights
#> Threshold -1.6326779152972688
#> Attrib am -0.8665856267177974
#> Attrib carb 1.2742538707969386
#> Attrib cyl -0.6362163143961329
#> Attrib disp 0.14156728727911363
#> Attrib drat 0.05547607250758171
#> Attrib gear 0.7253136531633986
#> Attrib hp 1.3273848444902248
#> Attrib qsec 3.450046451328654
#> Attrib vs 0.10823973109148212
#> Attrib wt 1.2360942432630941
#> Sigmoid Node 3
#> Inputs Weights
#> Threshold -2.7451365824335365
#> Attrib am 0.03397868715363972
#> Attrib carb 0.22163390666841548
#> Attrib cyl 0.40515132778420965
#> Attrib disp -1.701912671975106
#> Attrib drat 0.04538350545639396
#> Attrib gear 1.3701381042676775
#> Attrib hp -1.6733007496519663
#> Attrib qsec 4.774965415423988
#> Attrib vs -0.4461107765398499
#> Attrib wt -0.23164734776519336
#> Sigmoid Node 4
#> Inputs Weights
#> Threshold -1.941269430626847
#> Attrib am 0.5596075348360151
#> Attrib carb -0.15269110121880028
#> Attrib cyl -0.13303539422444885
#> Attrib disp 0.41720016239123175
#> Attrib drat -0.25882575937984326
#> Attrib gear 0.44133446216541644
#> Attrib hp -0.2620595381595253
#> Attrib qsec 0.85480591139455
#> Attrib vs -0.6282315395297724
#> Attrib wt -0.1890381841314677
#> Sigmoid Node 5
#> Inputs Weights
#> Threshold -1.0186355864903156
#> Attrib am 0.15620862455650217
#> Attrib carb 0.49478195431077565
#> Attrib cyl 0.020113265042069728
#> Attrib disp 0.3387877736744516
#> Attrib drat -0.11775305742033756
#> Attrib gear 0.32731209205370365
#> Attrib hp 0.517611154428185
#> Attrib qsec -0.05346214651752258
#> Attrib vs 0.14398586054938498
#> Attrib wt -0.002337036208707448
#> 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
#> 11.31987