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.5838563474615229
#> Node 1 0.6219893304610289
#> Node 2 -1.7356583653972018
#> Node 3 1.26782654582509
#> Node 4 1.2222714878791658
#> Node 5 0.7592163995142975
#> Sigmoid Node 1
#> Inputs Weights
#> Threshold -1.012938008582794
#> Attrib am 0.30812449698165545
#> Attrib carb 0.20260893698441582
#> Attrib cyl -0.08676605853797721
#> Attrib disp 0.2266048718065415
#> Attrib drat 0.45843683920971934
#> Attrib gear 0.5440701948261238
#> Attrib hp 0.20959018177881997
#> Attrib qsec 0.5812449791822961
#> Attrib vs 0.27041848531672613
#> Attrib wt 0.3089648972343755
#> Sigmoid Node 2
#> Inputs Weights
#> Threshold -0.9350498648218575
#> Attrib am -0.852184958152171
#> Attrib carb 2.6051987380308876
#> Attrib cyl -0.4803520740318329
#> Attrib disp 0.6807628378738653
#> Attrib drat -1.0225257801104746
#> Attrib gear 0.6737191858182072
#> Attrib hp 0.789206513352871
#> Attrib qsec 2.219137104581527
#> Attrib vs 0.3301497915503426
#> Attrib wt 0.22959699633029948
#> Sigmoid Node 3
#> Inputs Weights
#> Threshold -0.9759158946366273
#> Attrib am 0.12477734547658417
#> Attrib carb -0.45248015070208036
#> Attrib cyl -0.25488719203376226
#> Attrib disp 0.3268383593499668
#> Attrib drat -0.10033870925432059
#> Attrib gear 0.9631431574600532
#> Attrib hp -0.3629114448186849
#> Attrib qsec 1.1028532222787102
#> Attrib vs 0.8995543719190936
#> Attrib wt 0.6094023137701847
#> Sigmoid Node 4
#> Inputs Weights
#> Threshold -1.1583285939250365
#> Attrib am 0.9850312634193903
#> Attrib carb -0.02043203394936788
#> Attrib cyl 0.2932933866645914
#> Attrib disp 0.24232062979231284
#> Attrib drat 0.6750166534994777
#> Attrib gear 0.3984072949072358
#> Attrib hp 0.08483656237934646
#> Attrib qsec 1.4643074246705194
#> Attrib vs -0.14115146887095562
#> Attrib wt 0.541146808969728
#> Sigmoid Node 5
#> Inputs Weights
#> Threshold -0.9657862996840879
#> Attrib am 0.5068600323549111
#> Attrib carb 0.1774605614078688
#> Attrib cyl 0.09236197309059006
#> Attrib disp 0.20358877012940918
#> Attrib drat 0.5829071442623646
#> Attrib gear 0.48659676767283117
#> Attrib hp 0.23830867416576462
#> Attrib qsec 0.783836638563487
#> Attrib vs 0.1908173737224622
#> Attrib wt 0.38060491382131856
#> 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
#> 30.50898