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.4405269902112218
#>     Node 1    -0.23511745252851315
#>     Node 2    -2.8473526464565766
#>     Node 3    2.7285987755035657
#>     Node 4    0.6341390133108776
#>     Node 5    -0.1346381536365994
#> Sigmoid Node 1
#>     Inputs    Weights
#>     Threshold    -0.9620519908062624
#>     Attrib am    0.18210940969219927
#>     Attrib carb    0.6075039667870656
#>     Attrib cyl    -0.006258726198970353
#>     Attrib disp    0.24424200817712083
#>     Attrib drat    -0.07985758489515213
#>     Attrib gear    0.4115700845111302
#>     Attrib hp    0.520665039080193
#>     Attrib qsec    -0.06043542142455634
#>     Attrib vs    0.1872992127014772
#>     Attrib wt    0.04518138544516684
#> Sigmoid Node 2
#>     Inputs    Weights
#>     Threshold    -1.6326779152972688
#>     Attrib am    -0.8665856267177974
#>     Attrib carb    1.2742538707969386
#>     Attrib cyl    -0.6362163143961329
#>     Attrib disp    0.14156728727911363
#>     Attrib drat    0.05547607250758171
#>     Attrib gear    0.7253136531633986
#>     Attrib hp    1.3273848444902248
#>     Attrib qsec    3.450046451328654
#>     Attrib vs    0.10823973109148212
#>     Attrib wt    1.2360942432630941
#> Sigmoid Node 3
#>     Inputs    Weights
#>     Threshold    -2.7451365824335365
#>     Attrib am    0.03397868715363972
#>     Attrib carb    0.22163390666841548
#>     Attrib cyl    0.40515132778420965
#>     Attrib disp    -1.701912671975106
#>     Attrib drat    0.04538350545639396
#>     Attrib gear    1.3701381042676775
#>     Attrib hp    -1.6733007496519663
#>     Attrib qsec    4.774965415423988
#>     Attrib vs    -0.4461107765398499
#>     Attrib wt    -0.23164734776519336
#> Sigmoid Node 4
#>     Inputs    Weights
#>     Threshold    -1.941269430626847
#>     Attrib am    0.5596075348360151
#>     Attrib carb    -0.15269110121880028
#>     Attrib cyl    -0.13303539422444885
#>     Attrib disp    0.41720016239123175
#>     Attrib drat    -0.25882575937984326
#>     Attrib gear    0.44133446216541644
#>     Attrib hp    -0.2620595381595253
#>     Attrib qsec    0.85480591139455
#>     Attrib vs    -0.6282315395297724
#>     Attrib wt    -0.1890381841314677
#> Sigmoid Node 5
#>     Inputs    Weights
#>     Threshold    -1.0186355864903156
#>     Attrib am    0.15620862455650217
#>     Attrib carb    0.49478195431077565
#>     Attrib cyl    0.020113265042069728
#>     Attrib disp    0.3387877736744516
#>     Attrib drat    -0.11775305742033756
#>     Attrib gear    0.32731209205370365
#>     Attrib hp    0.517611154428185
#>     Attrib qsec    -0.05346214651752258
#>     Attrib vs    0.14398586054938498
#>     Attrib wt    -0.002337036208707448
#> 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 
#> 11.31987