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.07939770539913364
#>     Node 1    0.5080358907397399
#>     Node 2    -2.447310499615853
#>     Node 3    1.5644065422610587
#>     Node 4    1.8132253766831836
#>     Node 5    -1.0933992916779682
#> Sigmoid Node 1
#>     Inputs    Weights
#>     Threshold    -0.8996370321460248
#>     Attrib am    -0.08453645656321662
#>     Attrib carb    0.2637264388550888
#>     Attrib cyl    0.10075040032519572
#>     Attrib disp    0.4048291454119159
#>     Attrib drat    0.4781378871355537
#>     Attrib gear    0.17646253225919886
#>     Attrib hp    0.18996243589682427
#>     Attrib qsec    0.5392246512554997
#>     Attrib vs    0.010926019223445023
#>     Attrib wt    -0.44579208126883874
#> Sigmoid Node 2
#>     Inputs    Weights
#>     Threshold    0.044674087472921516
#>     Attrib am    1.2817950786454202
#>     Attrib carb    1.1927090454468954
#>     Attrib cyl    -0.9519068584781994
#>     Attrib disp    0.03136770547043512
#>     Attrib drat    1.2846472984900321
#>     Attrib gear    0.23904621250826283
#>     Attrib hp    1.4227500582510224
#>     Attrib qsec    -0.8878817029958662
#>     Attrib vs    -0.28358737587274035
#>     Attrib wt    1.8557054362975087
#> Sigmoid Node 3
#>     Inputs    Weights
#>     Threshold    -1.9452218257027392
#>     Attrib am    1.1728359502189343
#>     Attrib carb    0.7520797938358463
#>     Attrib cyl    0.6894168016403404
#>     Attrib disp    -0.30179370115106224
#>     Attrib drat    0.25902777495032164
#>     Attrib gear    0.8982173868607664
#>     Attrib hp    0.4433680903520475
#>     Attrib qsec    1.9075668781856612
#>     Attrib vs    -0.5342118552469789
#>     Attrib wt    -1.94220125551741
#> Sigmoid Node 4
#>     Inputs    Weights
#>     Threshold    -1.929307806322233
#>     Attrib am    1.3846503097978349
#>     Attrib carb    0.7952067515300789
#>     Attrib cyl    0.793039955621904
#>     Attrib disp    -0.362178974357932
#>     Attrib drat    0.26909641699512876
#>     Attrib gear    0.9980848649365959
#>     Attrib hp    0.42050597891710123
#>     Attrib qsec    2.153359391380379
#>     Attrib vs    -0.7870158925681497
#>     Attrib wt    -2.20886846371773
#> Sigmoid Node 5
#>     Inputs    Weights
#>     Threshold    -0.6544475644087858
#>     Attrib am    -0.00291434344897276
#>     Attrib carb    0.2933430436894338
#>     Attrib cyl    0.4197489390181201
#>     Attrib disp    -0.2208299442216282
#>     Attrib drat    -1.253479425196798
#>     Attrib gear    0.3369640498404908
#>     Attrib hp    -0.011792400197187518
#>     Attrib qsec    0.26470834366431817
#>     Attrib vs    -0.034932614403526366
#>     Attrib wt    0.09795670005649076
#> 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 
#> 16.09684