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

Active bindings

marshaled

(logical(1))
Whether the learner has been marshaled.

Methods

Inherited methods


Method new()

Creates a new instance of this R6 class.


Method marshal()

Marshal the learner's model.

Usage

LearnerRegrMultilayerPerceptron$marshal(...)

Arguments

...

(any)
Additional arguments passed to mlr3::marshal_model().


Method unmarshal()

Unmarshal the learner's model.

Usage

LearnerRegrMultilayerPerceptron$unmarshal(...)

Arguments

...

(any)
Additional arguments passed to mlr3::unmarshal_model().


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 = 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    1.4061628709494653
#>     Node 1    -0.22767259509015725
#>     Node 2    -1.962308085019038
#>     Node 3    -1.0651777285366386
#>     Node 4    -0.642579482095755
#>     Node 5    0.5937439962176824
#> Sigmoid Node 1
#>     Inputs    Weights
#>     Threshold    -0.8981424791707306
#>     Attrib am    -0.11268165880933799
#>     Attrib carb    0.5657753074140192
#>     Attrib cyl    -0.2864205156829589
#>     Attrib disp    0.3163035325584675
#>     Attrib drat    0.1095729013536005
#>     Attrib gear    -0.22907057718029908
#>     Attrib hp    0.6229507281159385
#>     Attrib qsec    0.0887840729262718
#>     Attrib vs    -0.01557340952167525
#>     Attrib wt    0.008383065350210009
#> Sigmoid Node 2
#>     Inputs    Weights
#>     Threshold    2.4112126841519226
#>     Attrib am    0.13480582638694494
#>     Attrib carb    -0.034550130776182165
#>     Attrib cyl    -0.2809736596858069
#>     Attrib disp    0.6324550569151409
#>     Attrib drat    1.7880095147264208
#>     Attrib gear    -1.8531483201697638
#>     Attrib hp    1.5203249370189946
#>     Attrib qsec    -0.8930311377762803
#>     Attrib vs    -1.1128219571293327
#>     Attrib wt    3.1163663989968216
#> Sigmoid Node 3
#>     Inputs    Weights
#>     Threshold    -0.8328567136660378
#>     Attrib am    0.1378782307052939
#>     Attrib carb    1.1233159114801272
#>     Attrib cyl    -0.308717435064931
#>     Attrib disp    0.05428711227745474
#>     Attrib drat    0.8740189706591664
#>     Attrib gear    -0.47779272689531377
#>     Attrib hp    0.9609970624622497
#>     Attrib qsec    0.2713730141273784
#>     Attrib vs    0.25521477419519545
#>     Attrib wt    0.09330178424770905
#> Sigmoid Node 4
#>     Inputs    Weights
#>     Threshold    -0.8397000894215696
#>     Attrib am    -0.020080984499304955
#>     Attrib carb    0.8305241549690834
#>     Attrib cyl    -0.2951630750746551
#>     Attrib disp    0.16621133546462774
#>     Attrib drat    0.6151257665855657
#>     Attrib gear    -0.35064477156337764
#>     Attrib hp    0.7195359998034568
#>     Attrib qsec    0.21799981812920907
#>     Attrib vs    -0.04756191829373481
#>     Attrib wt    -0.07536431233560165
#> Sigmoid Node 5
#>     Inputs    Weights
#>     Threshold    -0.481721364958586
#>     Attrib am    0.20903370524241532
#>     Attrib carb    0.5712286586549968
#>     Attrib cyl    0.024238529332014612
#>     Attrib disp    0.5605652953514442
#>     Attrib drat    -0.26152508680188435
#>     Attrib gear    0.36137913542916855
#>     Attrib hp    0.7822450793200952
#>     Attrib qsec    -0.7554684862237349
#>     Attrib vs    0.12875829208521644
#>     Attrib wt    0.21045472492607306
#> 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 
#> 28.20605