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.07939770539913364
#> Node 1 0.5080358907397399
#> Node 2 -2.447310499615853
#> Node 3 1.5644065422610587
#> Node 4 1.8132253766831836
#> Node 5 -1.0933992916779682
#> Sigmoid Node 1
#> Inputs Weights
#> Threshold -0.8996370321460248
#> Attrib am -0.08453645656321662
#> Attrib carb 0.2637264388550888
#> Attrib cyl 0.10075040032519572
#> Attrib disp 0.4048291454119159
#> Attrib drat 0.4781378871355537
#> Attrib gear 0.17646253225919886
#> Attrib hp 0.18996243589682427
#> Attrib qsec 0.5392246512554997
#> Attrib vs 0.010926019223445023
#> Attrib wt -0.44579208126883874
#> Sigmoid Node 2
#> Inputs Weights
#> Threshold 0.044674087472921516
#> Attrib am 1.2817950786454202
#> Attrib carb 1.1927090454468954
#> Attrib cyl -0.9519068584781994
#> Attrib disp 0.03136770547043512
#> Attrib drat 1.2846472984900321
#> Attrib gear 0.23904621250826283
#> Attrib hp 1.4227500582510224
#> Attrib qsec -0.8878817029958662
#> Attrib vs -0.28358737587274035
#> Attrib wt 1.8557054362975087
#> Sigmoid Node 3
#> Inputs Weights
#> Threshold -1.9452218257027392
#> Attrib am 1.1728359502189343
#> Attrib carb 0.7520797938358463
#> Attrib cyl 0.6894168016403404
#> Attrib disp -0.30179370115106224
#> Attrib drat 0.25902777495032164
#> Attrib gear 0.8982173868607664
#> Attrib hp 0.4433680903520475
#> Attrib qsec 1.9075668781856612
#> Attrib vs -0.5342118552469789
#> Attrib wt -1.94220125551741
#> Sigmoid Node 4
#> Inputs Weights
#> Threshold -1.929307806322233
#> Attrib am 1.3846503097978349
#> Attrib carb 0.7952067515300789
#> Attrib cyl 0.793039955621904
#> Attrib disp -0.362178974357932
#> Attrib drat 0.26909641699512876
#> Attrib gear 0.9980848649365959
#> Attrib hp 0.42050597891710123
#> Attrib qsec 2.153359391380379
#> Attrib vs -0.7870158925681497
#> Attrib wt -2.20886846371773
#> Sigmoid Node 5
#> Inputs Weights
#> Threshold -0.6544475644087858
#> Attrib am -0.00291434344897276
#> Attrib carb 0.2933430436894338
#> Attrib cyl 0.4197489390181201
#> Attrib disp -0.2208299442216282
#> Attrib drat -1.253479425196798
#> Attrib gear 0.3369640498404908
#> Attrib hp -0.011792400197187518
#> Attrib qsec 0.26470834366431817
#> Attrib vs -0.034932614403526366
#> Attrib wt 0.09795670005649076
#> 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
#> 16.09684