Skip to contents

Regressor 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

  • G removed:

    • GUI will be opened

  • Reason for change: The parameter is removed because we don't want to launch GUI.

Dictionary

This Learner can be instantiated via lrn():

lrn("regr.multilayer_perceptron")

Meta Information

  • Task type: “regr”

  • Predict Types: “response”

  • Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered”

  • Required Packages: mlr3, RWeka

Parameters

IdTypeDefaultLevelsRange
subsetuntyped--
na.actionuntyped--
Lnumeric0.3\([0, 1]\)
Mnumeric0.2\([0, 1]\)
Ninteger500\([1, \infty)\)
Vnumeric0\([0, 100]\)
Sinteger0\([0, \infty)\)
Einteger20\([1, \infty)\)
AlogicalFALSETRUE, FALSE-
BlogicalFALSETRUE, FALSE-
Huntyped"a"-
ClogicalFALSETRUE, FALSE-
IlogicalFALSETRUE, FALSE-
RlogicalFALSETRUE, FALSE-
DlogicalFALSETRUE, FALSE-
output_debug_infologicalFALSETRUE, FALSE-
do_not_check_capabilitieslogicalFALSETRUE, FALSE-
num_decimal_placesinteger2\([1, \infty)\)
batch_sizeinteger100\([1, \infty)\)
optionsuntypedNULL-

See also

Author

damirpolat

Super classes

mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrMultilayerPerceptron

Methods

Inherited methods


Method new()

Creates a new instance of this R6 class.


Method clone()

The objects of this class are cloneable with this method.

Usage

LearnerRegrMultilayerPerceptron$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

# Define the Learner
learner = mlr3::lrn("regr.multilayer_perceptron")
print(learner)
#> <LearnerRegrMultilayerPerceptron:regr.multilayer_perceptron>: MultilayerPerceptron
#> * Model: -
#> * Parameters: list()
#> * Packages: mlr3, RWeka
#> * Predict Types:  [response]
#> * Feature Types: logical, integer, numeric, factor, ordered
#> * Properties: missings

# Define a Task
task = mlr3::tsk("mtcars")

# Create train and test set
ids = mlr3::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.06197649198544428
#>     Node 1    -1.6062538975798295
#>     Node 2    -1.4465224918387964
#>     Node 3    0.025402188150693252
#>     Node 4    2.019348413274293
#>     Node 5    1.1387361182842923
#> Sigmoid Node 1
#>     Inputs    Weights
#>     Threshold    -1.5205156997169158
#>     Attrib am    0.7225160983491538
#>     Attrib carb    1.3836810527674466
#>     Attrib cyl    -0.43644394399548775
#>     Attrib disp    1.120891967504858
#>     Attrib drat    -0.7604483156470717
#>     Attrib gear    0.6588282434910974
#>     Attrib hp    -0.03233246482658846
#>     Attrib qsec    1.0482664534189956
#>     Attrib vs    0.3148596847457337
#>     Attrib wt    1.223791910799451
#> Sigmoid Node 2
#>     Inputs    Weights
#>     Threshold    -0.11465475634289467
#>     Attrib am    1.8601373617060042
#>     Attrib carb    1.006480782917844
#>     Attrib cyl    -0.262675178616102
#>     Attrib disp    0.20805303122679358
#>     Attrib drat    -0.7320570241414002
#>     Attrib gear    0.09724631525540631
#>     Attrib hp    -0.8347121032705278
#>     Attrib qsec    -1.889334116714627
#>     Attrib vs    -1.1664240523498615
#>     Attrib wt    -1.532615481249111
#> Sigmoid Node 3
#>     Inputs    Weights
#>     Threshold    -1.4010119783774824
#>     Attrib am    -0.13980728064333198
#>     Attrib carb    0.06994827734437659
#>     Attrib cyl    0.3231000728060931
#>     Attrib disp    0.21873898083173052
#>     Attrib drat    0.7017092861683023
#>     Attrib gear    0.6209134712030223
#>     Attrib hp    -0.06911862832149525
#>     Attrib qsec    -0.10620319925561762
#>     Attrib vs    -0.11926128517970014
#>     Attrib wt    0.0690507593692596
#> Sigmoid Node 4
#>     Inputs    Weights
#>     Threshold    -2.2630210998371236
#>     Attrib am    0.7262467111348131
#>     Attrib carb    0.09402919043952722
#>     Attrib cyl    0.28423213645231626
#>     Attrib disp    -0.7784937063018198
#>     Attrib drat    3.2569369682179268
#>     Attrib gear    1.6778755450411482
#>     Attrib hp    -2.4071634403730684
#>     Attrib qsec    1.4767619596807418
#>     Attrib vs    -1.3978696296487307
#>     Attrib wt    -0.9010220974426852
#> Sigmoid Node 5
#>     Inputs    Weights
#>     Threshold    -1.0143836277245006
#>     Attrib am    -0.43731436528815615
#>     Attrib carb    0.17435008686159476
#>     Attrib cyl    0.18813503980451013
#>     Attrib disp    0.49976264559784933
#>     Attrib drat    0.8008852480327449
#>     Attrib gear    0.44073095447197463
#>     Attrib hp    0.9435607660082773
#>     Attrib qsec    -1.051161501289994
#>     Attrib vs    0.08896732727610464
#>     Attrib wt    0.1658312885069201
#> 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 
#> 47.10937