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/chapters/chapter2/data_and_basic_modeling.html#sec-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()
LearnerRegrMultilayerPerceptron$marshal()
Marshal the learner's model.
Arguments
...(any)
Additional arguments passed tomlr3::marshal_model().
LearnerRegrMultilayerPerceptron$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', predict_raw = 'FALSE'
# 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.1051040387050717
#> Node 1 -1.31980971173652
#> Node 2 -1.8879518062754115
#> Node 3 1.152000705295494
#> Node 4 2.07735761654371
#> Node 5 -0.42818577036863487
#> Sigmoid Node 1
#> Inputs Weights
#> Threshold -1.1237279845384993
#> Attrib am -0.4556436848622621
#> Attrib carb 1.8997557001478413
#> Attrib cyl -0.22779622339987887
#> Attrib disp 1.1699555275444775
#> Attrib drat 1.0034367396607193
#> Attrib gear 1.1333642936265458
#> Attrib hp -0.6247871534621207
#> Attrib qsec -0.6032708953576351
#> Attrib vs -0.056676868245943056
#> Attrib wt 0.41528392961185584
#> Sigmoid Node 2
#> Inputs Weights
#> Threshold 1.0147275034841623
#> Attrib am -0.5435460522518388
#> Attrib carb -1.6174001360024803
#> Attrib cyl 1.12849878951632
#> Attrib disp -0.11478574592637611
#> Attrib drat -0.7360066723136798
#> Attrib gear -0.9945916085657687
#> Attrib hp 0.4497384333056292
#> Attrib qsec -1.5301380909971511
#> Attrib vs 0.49284718708168906
#> Attrib wt 0.5153187506599095
#> Sigmoid Node 3
#> Inputs Weights
#> Threshold -0.8296705052166633
#> Attrib am 0.32308919284412996
#> Attrib carb -0.3039153894330395
#> Attrib cyl 0.3435278970157961
#> Attrib disp 0.2719235977239182
#> Attrib drat 0.31647728488350224
#> Attrib gear 0.1856130326673884
#> Attrib hp 1.8594073536474822
#> Attrib qsec 0.29970657132028417
#> Attrib vs 0.2512226141482022
#> Attrib wt 0.0019910187942567856
#> Sigmoid Node 4
#> Inputs Weights
#> Threshold -0.6372714369277164
#> Attrib am 0.12640615883443332
#> Attrib carb -1.1966033404901983
#> Attrib cyl 0.289544021711898
#> Attrib disp 1.0601406828579139
#> Attrib drat 1.0536145670223447
#> Attrib gear 0.33502223130537323
#> Attrib hp 2.858977796341536
#> Attrib qsec 0.9554175179966133
#> Attrib vs 0.7556664729146538
#> Attrib wt -0.40008818014132363
#> Sigmoid Node 5
#> Inputs Weights
#> Threshold -0.9058713699078198
#> Attrib am 0.0011227028673364051
#> Attrib carb 0.8796917908311987
#> Attrib cyl -0.190452787343199
#> Attrib disp 0.24605794847479878
#> Attrib drat 0.7363083474527705
#> Attrib gear 0.6762736887808396
#> Attrib hp -0.4715331152117888
#> Attrib qsec -0.6645724157089326
#> Attrib vs 0.07011991574793719
#> Attrib wt 0.24033239921809352
#> 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
#> 123.4437