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.06197649198544428
#> Node 1 -1.6062538975798295
#> Node 2 -1.4465224918387964
#> Node 3 0.025402188150693252
#> Node 4 2.019348413274293
#> Node 5 1.1387361182842923
#> Sigmoid Node 1
#> Inputs Weights
#> Threshold -1.5205156997169158
#> Attrib am 0.7225160983491538
#> Attrib carb 1.3836810527674466
#> Attrib cyl -0.43644394399548775
#> Attrib disp 1.120891967504858
#> Attrib drat -0.7604483156470717
#> Attrib gear 0.6588282434910974
#> Attrib hp -0.03233246482658846
#> Attrib qsec 1.0482664534189956
#> Attrib vs 0.3148596847457337
#> Attrib wt 1.223791910799451
#> Sigmoid Node 2
#> Inputs Weights
#> Threshold -0.11465475634289467
#> Attrib am 1.8601373617060042
#> Attrib carb 1.006480782917844
#> Attrib cyl -0.262675178616102
#> Attrib disp 0.20805303122679358
#> Attrib drat -0.7320570241414002
#> Attrib gear 0.09724631525540631
#> Attrib hp -0.8347121032705278
#> Attrib qsec -1.889334116714627
#> Attrib vs -1.1664240523498615
#> Attrib wt -1.532615481249111
#> Sigmoid Node 3
#> Inputs Weights
#> Threshold -1.4010119783774824
#> Attrib am -0.13980728064333198
#> Attrib carb 0.06994827734437659
#> Attrib cyl 0.3231000728060931
#> Attrib disp 0.21873898083173052
#> Attrib drat 0.7017092861683023
#> Attrib gear 0.6209134712030223
#> Attrib hp -0.06911862832149525
#> Attrib qsec -0.10620319925561762
#> Attrib vs -0.11926128517970014
#> Attrib wt 0.0690507593692596
#> Sigmoid Node 4
#> Inputs Weights
#> Threshold -2.2630210998371236
#> Attrib am 0.7262467111348131
#> Attrib carb 0.09402919043952722
#> Attrib cyl 0.28423213645231626
#> Attrib disp -0.7784937063018198
#> Attrib drat 3.2569369682179268
#> Attrib gear 1.6778755450411482
#> Attrib hp -2.4071634403730684
#> Attrib qsec 1.4767619596807418
#> Attrib vs -1.3978696296487307
#> Attrib wt -0.9010220974426852
#> Sigmoid Node 5
#> Inputs Weights
#> Threshold -1.0143836277245006
#> Attrib am -0.43731436528815615
#> Attrib carb 0.17435008686159476
#> Attrib cyl 0.18813503980451013
#> Attrib disp 0.49976264559784933
#> Attrib drat 0.8008852480327449
#> Attrib gear 0.44073095447197463
#> Attrib hp 0.9435607660082773
#> Attrib qsec -1.051161501289994
#> Attrib vs 0.08896732727610464
#> Attrib wt 0.1658312885069201
#> 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
#> 47.10937