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.013560767139076422
#> Node 1 -0.8051193843775714
#> Node 2 -2.0972260826944393
#> Node 3 2.1226875663200424
#> Node 4 1.646088113601057
#> Node 5 0.22050573754699085
#> Sigmoid Node 1
#> Inputs Weights
#> Threshold -0.6173462365743176
#> Attrib am 0.3154357616924847
#> Attrib carb 0.76502155678801
#> Attrib cyl -0.7256082228422014
#> Attrib disp 0.08761884624546855
#> Attrib drat -0.0717721159212196
#> Attrib gear 0.93248169387506
#> Attrib hp -0.09754439619945228
#> Attrib qsec -0.3071724542030238
#> Attrib vs 0.0984408874551961
#> Attrib wt -0.05112777433022939
#> Sigmoid Node 2
#> Inputs Weights
#> Threshold -0.9185692863626529
#> Attrib am 0.9055843595388748
#> Attrib carb 2.006815888250691
#> Attrib cyl -0.38380022074136627
#> Attrib disp 0.9612752668812057
#> Attrib drat -2.042474279847134
#> Attrib gear 0.18746933855262038
#> Attrib hp -0.3259984444440113
#> Attrib qsec 0.4345578438666836
#> Attrib vs -0.7648499298407996
#> Attrib wt -0.8971586356259974
#> Sigmoid Node 3
#> Inputs Weights
#> Threshold -2.491681832629632
#> Attrib am 1.2680045585912167
#> Attrib carb 0.025837891372880926
#> Attrib cyl 1.101452676466713
#> Attrib disp -0.2172087553125721
#> Attrib drat 0.21620256107425068
#> Attrib gear 1.7568450955953412
#> Attrib hp -0.021096815472560888
#> Attrib qsec 2.43658517663926
#> Attrib vs -0.7386858457984034
#> Attrib wt -1.9176247210595667
#> Sigmoid Node 4
#> Inputs Weights
#> Threshold -2.1291615886640107
#> Attrib am 1.2037190777029694
#> Attrib carb 0.16587288637315617
#> Attrib cyl 0.8455309175496124
#> Attrib disp -0.16950626205272967
#> Attrib drat 0.3692369757513939
#> Attrib gear 1.6603283308664376
#> Attrib hp 0.0296093430478238
#> Attrib qsec 2.011845255908432
#> Attrib vs -0.7526470582383215
#> Attrib wt -1.541687797447327
#> Sigmoid Node 5
#> Inputs Weights
#> Threshold -1.121781445946476
#> Attrib am -0.16182021990733667
#> Attrib carb -0.10012023983687135
#> Attrib cyl 0.4967027812815171
#> Attrib disp 0.08148286779047664
#> Attrib drat 0.2207334090237668
#> Attrib gear 0.44953041997310933
#> Attrib hp 0.09892108583272183
#> Attrib qsec 0.6341945431611502
#> Attrib vs 0.5579777847557582
#> Attrib wt -0.5627476866144132
#> 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
#> 57.73947