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.07570234496316243
#> Node 1 -0.918840376857143
#> Node 2 -1.1917500782442292
#> Node 3 1.9968651822263856
#> Node 4 1.3160175451189677
#> Node 5 0.11113497922754798
#> Sigmoid Node 1
#> Inputs Weights
#> Threshold -0.6446201745796042
#> Attrib am 0.7330130913986805
#> Attrib carb 1.1614711046285597
#> Attrib cyl -0.3328449716199986
#> Attrib disp 0.0025179383361567387
#> Attrib drat -0.5799870341689947
#> Attrib gear 0.336035962127614
#> Attrib hp -0.35822689631975807
#> Attrib qsec -0.0019555053563161777
#> Attrib vs -0.522143132687912
#> Attrib wt 0.048121695774856026
#> Sigmoid Node 2
#> Inputs Weights
#> Threshold 0.5858929357543224
#> Attrib am 0.6413621406354496
#> Attrib carb 2.1171037977360676
#> Attrib cyl -0.48102391739339573
#> Attrib disp -0.344268104210323
#> Attrib drat -0.918125302319758
#> Attrib gear 0.38636202726463337
#> Attrib hp -0.789885052966781
#> Attrib qsec -0.25321597921511446
#> Attrib vs -0.8120219466138805
#> Attrib wt 0.196066337327231
#> Sigmoid Node 3
#> Inputs Weights
#> Threshold -2.50430529001004
#> Attrib am 1.294097265003915
#> Attrib carb 0.10485216327316166
#> Attrib cyl 0.7837079891154759
#> Attrib disp -0.33629274859664315
#> Attrib drat 0.1380875034461899
#> Attrib gear 1.7425091065599219
#> Attrib hp 0.02161907675759177
#> Attrib qsec 2.210638741128006
#> Attrib vs -0.7495033767967849
#> Attrib wt -2.4565422687861305
#> Sigmoid Node 4
#> Inputs Weights
#> Threshold -2.2878093394772194
#> Attrib am 0.7650186994552152
#> Attrib carb -0.03243888984552668
#> Attrib cyl 0.8499419897876074
#> Attrib disp 0.3015853623859835
#> Attrib drat 0.04839228506254863
#> Attrib gear 0.9937817094928213
#> Attrib hp 0.1738692931525801
#> Attrib qsec 1.7337636857863608
#> Attrib vs -0.16680932807076446
#> Attrib wt -1.9759178430611921
#> Sigmoid Node 5
#> Inputs Weights
#> Threshold -1.1297361487558424
#> Attrib am -0.020854462055928034
#> Attrib carb 0.16393855862565518
#> Attrib cyl 0.0316543075650903
#> Attrib disp 0.12909057630688178
#> Attrib drat 0.33276838644889717
#> Attrib gear 0.025911506808623235
#> Attrib hp 0.2321492246440078
#> Attrib qsec 0.4163584843603366
#> Attrib vs 0.40100861285907036
#> Attrib wt -0.11875938942764655
#> 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
#> 21.69963