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.015969456983696718
#> Node 1 -2.1692573407088287
#> Node 2 -0.7077242121733289
#> Node 3 -0.056176684028666796
#> Node 4 2.313727999857748
#> Node 5 -0.21335592133631895
#> Sigmoid Node 1
#> Inputs Weights
#> Threshold -0.7072445353781918
#> Attrib am -0.26861614997115696
#> Attrib carb 1.4100171814201048
#> Attrib cyl -1.4667773623774722
#> Attrib disp 0.30450622306476643
#> Attrib drat 1.8974012731963632
#> Attrib gear 0.5132688608174519
#> Attrib hp 0.31504501028227233
#> Attrib qsec 0.1935797559055674
#> Attrib vs 0.4949141508934376
#> Attrib wt 1.393935809370832
#> Sigmoid Node 2
#> Inputs Weights
#> Threshold -0.8705441818471156
#> Attrib am -1.052634951740239
#> Attrib carb 0.37205223850545815
#> Attrib cyl 0.46171164922471153
#> Attrib disp -1.1835072014639807
#> Attrib drat 0.6455188662127403
#> Attrib gear 0.39804849268592507
#> Attrib hp -0.7515700098993566
#> Attrib qsec 0.9366048570938219
#> Attrib vs -0.8449987839804968
#> Attrib wt 1.2813095314089125
#> Sigmoid Node 3
#> Inputs Weights
#> Threshold -1.1213607302328183
#> Attrib am -3.6863237825343045E-4
#> Attrib carb 0.3122576252781201
#> Attrib cyl 0.03665997343280893
#> Attrib disp 0.29014712719618335
#> Attrib drat 0.3486960480062039
#> Attrib gear 0.42589743686606885
#> Attrib hp 0.18510099768406033
#> Attrib qsec 0.18320151815703709
#> Attrib vs 0.05182113293971315
#> Attrib wt 0.1484389963888983
#> Sigmoid Node 4
#> Inputs Weights
#> Threshold -1.6030663892764494
#> Attrib am -0.8959326661963962
#> Attrib carb 1.218057815178789
#> Attrib cyl 0.9181654399975391
#> Attrib disp -1.3009661488139976
#> Attrib drat 1.9220835984816766
#> Attrib gear 1.624804291498969
#> Attrib hp -2.099043341286964
#> Attrib qsec 1.9073677697245148
#> Attrib vs 0.3220234155699061
#> Attrib wt -1.9038503269752183
#> Sigmoid Node 5
#> Inputs Weights
#> Threshold -1.0088414329428468
#> Attrib am 0.10080355003748682
#> Attrib carb 0.352546195281757
#> Attrib cyl -0.01593998751734075
#> Attrib disp 0.23533827032751004
#> Attrib drat 0.5951664578281444
#> Attrib gear 0.41035972092086925
#> Attrib hp 0.14466892990570607
#> Attrib qsec 0.2441574857622681
#> Attrib vs -4.844292321345325E-4
#> Attrib wt 0.29363241842889115
#> 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
#> 46.28459