Regression MultilayerPerceptron Learner
Source:R/learner_RWeka_regr_multilayer_perceptron.R
mlr_learners_regr.multilayer_perceptron.RdRegressor 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
Gremoved: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
Methods
Inherited methods
mlr3::Learner$base_learner()mlr3::Learner$configure()mlr3::Learner$encapsulate()mlr3::Learner$format()mlr3::Learner$help()mlr3::Learner$predict()mlr3::Learner$predict_newdata()mlr3::Learner$print()mlr3::Learner$reset()mlr3::Learner$selected_features()mlr3::Learner$train()mlr3::LearnerRegr$predict_newdata_fast()
Method marshal()
Marshal the learner's model.
Arguments
...(any)
Additional arguments passed tomlr3::marshal_model().
Method unmarshal()
Unmarshal the learner's model.
Arguments
...(any)
Additional arguments passed tomlr3::unmarshal_model().
Examples
# Define the Learner
learner = lrn("regr.multilayer_perceptron")
print(learner)
#>
#> ── <LearnerRegrMultilayerPerceptron> (regr.multilayer_perceptron): MultilayerPer
#> • Model: -
#> • Parameters: list()
#> • Packages: mlr3 and RWeka
#> • Predict Types: [response]
#> • Feature Types: logical, integer, numeric, factor, and ordered
#> • Encapsulation: none (fallback: -)
#> • Properties: marshal and missings
#> • Other settings: use_weights = 'error'
# Define a Task
task = tsk("mtcars")
# Create train and test set
ids = 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.27019560788326547
#> Node 1 -0.1718822664325223
#> Node 2 -1.6189441607724973
#> Node 3 1.186235355319526
#> Node 4 1.3907306722676045
#> Node 5 0.6520216772484777
#> Sigmoid Node 1
#> Inputs Weights
#> Threshold -0.5396329656113689
#> Attrib am 0.253360737326545
#> Attrib carb 0.33436577164843706
#> Attrib cyl -0.061773869838566635
#> Attrib disp 0.15330171404211262
#> Attrib drat 0.043733948319780655
#> Attrib gear 0.28949734701107643
#> Attrib hp 0.2598273055618916
#> Attrib qsec -0.07415761847765469
#> Attrib vs -0.0606993763985752
#> Attrib wt 0.22082705867952696
#> Sigmoid Node 2
#> Inputs Weights
#> Threshold 0.7574181386772569
#> Attrib am 0.4398118081711256
#> Attrib carb 1.2037770766630689
#> Attrib cyl 0.06201994702526978
#> Attrib disp 0.5960277056650897
#> Attrib drat 0.3998621822993917
#> Attrib gear 0.7607035151596883
#> Attrib hp 1.0092615901927822
#> Attrib qsec -0.19406176379033768
#> Attrib vs 0.8135902995802741
#> Attrib wt 1.1311685905989464
#> Sigmoid Node 3
#> Inputs Weights
#> Threshold -0.9356546143924589
#> Attrib am -0.46263196353594066
#> Attrib carb 0.04922441497657211
#> Attrib cyl -0.26077193949237804
#> Attrib disp 0.43890145130357006
#> Attrib drat 0.7344624662405458
#> Attrib gear 0.3062645757397739
#> Attrib hp -0.12738674442334233
#> Attrib qsec -0.3372410316612208
#> Attrib vs 0.6649637236865619
#> Attrib wt -1.174324666014897
#> Sigmoid Node 4
#> Inputs Weights
#> Threshold -1.3098638157247227
#> Attrib am 0.240939466113163
#> Attrib carb 0.8777167890634588
#> Attrib cyl -0.3346800709385331
#> Attrib disp -0.018362777952928896
#> Attrib drat 0.48428199747603534
#> Attrib gear 1.2523492202056379
#> Attrib hp 0.21273766104728464
#> Attrib qsec 0.004153150704099657
#> Attrib vs -0.2740599928717142
#> Attrib wt -0.7440110543040349
#> Sigmoid Node 5
#> Inputs Weights
#> Threshold -0.6501524680161949
#> Attrib am -0.03535352716625089
#> Attrib carb 0.21149132002938612
#> Attrib cyl -0.1251805216583407
#> Attrib disp 0.14266156769795732
#> Attrib drat 0.6172894612686696
#> Attrib gear 0.4131021899918383
#> Attrib hp -0.08147727456022691
#> Attrib qsec -0.21305769449177944
#> Attrib vs 0.3221656876223614
#> Attrib wt -0.6617947345075765
#> 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.90819