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 0.6945753705353622
#> Node 1 -0.8857573393066372
#> Node 2 -1.1288375332827605
#> Node 3 2.2484648097610074
#> Node 4 0.15305929766570203
#> Node 5 -0.5419214222784402
#> Sigmoid Node 1
#> Inputs Weights
#> Threshold -0.6729927509735206
#> Attrib am 0.22825082622934723
#> Attrib carb 0.6217850427763009
#> Attrib cyl -0.9683924869153384
#> Attrib disp 0.11098472509440817
#> Attrib drat -0.006211296668445627
#> Attrib gear 0.8527427853978174
#> Attrib hp 0.06889619785390859
#> Attrib qsec -0.2795234416221884
#> Attrib vs 0.4285116343702588
#> Attrib wt 0.6534516672352739
#> Sigmoid Node 2
#> Inputs Weights
#> Threshold 0.9704109464504828
#> Attrib am 0.13309470695217804
#> Attrib carb -0.4236557113486706
#> Attrib cyl -0.24615703182310644
#> Attrib disp -0.771583748304646
#> Attrib drat -1.1311364512619775
#> Attrib gear 0.17607526549204253
#> Attrib hp 0.09265738327274287
#> Attrib qsec -0.5452935407236874
#> Attrib vs -1.7708169683791184
#> Attrib wt 1.996798011294549
#> Sigmoid Node 3
#> Inputs Weights
#> Threshold -2.3087471488834908
#> Attrib am 1.5771475830246093
#> Attrib carb -0.033008036176196354
#> Attrib cyl 0.8250178139460521
#> Attrib disp -0.6339543674410977
#> Attrib drat -0.35688401727222613
#> Attrib gear 1.0239487112537013
#> Attrib hp 0.10170526549723792
#> Attrib qsec 2.6224849739758986
#> Attrib vs -0.6889210235731933
#> Attrib wt -1.2457175172573987
#> Sigmoid Node 4
#> Inputs Weights
#> Threshold -0.9805472982670688
#> Attrib am 0.1150678344279488
#> Attrib carb 0.6269991731457484
#> Attrib cyl 0.10463748965618738
#> Attrib disp 0.034465288200853116
#> Attrib drat 0.22707795981557985
#> Attrib gear 0.3848741833125485
#> Attrib hp 0.4910747123090154
#> Attrib qsec 0.31094301735448426
#> Attrib vs -0.06572258232130679
#> Attrib wt -0.03967231281563914
#> Sigmoid Node 5
#> Inputs Weights
#> Threshold -0.6648502557697633
#> Attrib am 0.3306708141058065
#> Attrib carb 0.6054257684847401
#> Attrib cyl -0.6067687337679653
#> Attrib disp 0.2225650659004779
#> Attrib drat 0.12699226201619315
#> Attrib gear 0.7289918120667643
#> Attrib hp 0.15942887640657538
#> Attrib qsec -0.2279605833709971
#> Attrib vs 0.27334158039310075
#> Attrib wt 0.4951522908044466
#> 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
#> 10.798