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 1.8793212777392088
#> Node 1 -1.0668344884210859
#> Node 2 -2.2207724927155654
#> Node 3 1.1846946024969336
#> Node 4 -0.6392755360383456
#> Node 5 -1.1383214231851104
#> Sigmoid Node 1
#> Inputs Weights
#> Threshold -0.6855787011488788
#> Attrib am 8.116391776806639E-4
#> Attrib carb 0.940268867058409
#> Attrib cyl -0.906913585430809
#> Attrib disp -0.5307842121179325
#> Attrib drat 0.5654463295259823
#> Attrib gear -0.6175377055350212
#> Attrib hp 0.46299105196993784
#> Attrib qsec -1.2805103531685607
#> Attrib vs 0.46118703667464833
#> Attrib wt 1.232899768404106
#> Sigmoid Node 2
#> Inputs Weights
#> Threshold 2.574301376608095
#> Attrib am -0.7974090940610513
#> Attrib carb -2.030369585839095
#> Attrib cyl -0.911210066831766
#> Attrib disp 0.975658353194449
#> Attrib drat -1.190634338718098
#> Attrib gear -2.7019949643533328
#> Attrib hp 1.0356607013263994
#> Attrib qsec -3.906117099829944
#> Attrib vs -0.314747359557035
#> Attrib wt 1.549615197307167
#> Sigmoid Node 3
#> Inputs Weights
#> Threshold -2.5757980321289815
#> Attrib am 0.05617729425315856
#> Attrib carb 0.9541497873325402
#> Attrib cyl 0.4218988815525881
#> Attrib disp -0.48249503281830347
#> Attrib drat -0.6572878356717505
#> Attrib gear 2.187221008200008
#> Attrib hp -0.20547300396011603
#> Attrib qsec 1.6851444871530512
#> Attrib vs 0.5934633590467926
#> Attrib wt -0.5516961082582242
#> Sigmoid Node 4
#> Inputs Weights
#> Threshold -1.0007806182055998
#> Attrib am -0.04288080604779301
#> Attrib carb 0.887627939476949
#> Attrib cyl -0.26086785119599937
#> Attrib disp 0.027228860368212326
#> Attrib drat 0.1918311064977426
#> Attrib gear 0.12651954984925687
#> Attrib hp 0.40879678936515074
#> Attrib qsec -0.12546446938394237
#> Attrib vs 0.17270614714363786
#> Attrib wt 0.6940158549452485
#> Sigmoid Node 5
#> Inputs Weights
#> Threshold -0.31943006969869486
#> Attrib am -0.11373577265147795
#> Attrib carb 0.31957304363979033
#> Attrib cyl -0.809852181151732
#> Attrib disp -2.054010506541814
#> Attrib drat -0.38229345634266976
#> Attrib gear -0.7796620105835034
#> Attrib hp -0.44949991238487247
#> Attrib qsec -1.7212038537937635
#> Attrib vs 0.2838623385363306
#> Attrib wt 0.23755877491422467
#> 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
#> 89.38865