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): MultilayerPer
#> • Model: -
#> • Parameters: list()
#> • Packages: mlr3 and RWeka
#> • Predict Types: [response]
#> • Feature Types: logical, integer, numeric, factor, and ordered
#> • Encapsulation: none (fallback: -)
#> • Properties: missings
#> • Other settings: use_weights = 'error'

# 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.27658305028520547
#>     Node 1    0.8469912545862693
#>     Node 2    -1.6852974596809058
#>     Node 3    1.5570163430002895
#>     Node 4    1.335541358415677
#>     Node 5    -0.4039224612290253
#> Sigmoid Node 1
#>     Inputs    Weights
#>     Threshold    -1.0044917951524297
#>     Attrib am    -0.1094655336782831
#>     Attrib carb    0.2526289929910076
#>     Attrib cyl    -0.40875675952012436
#>     Attrib disp    0.7382163498896149
#>     Attrib drat    0.6875794539959842
#>     Attrib gear    -0.4189289389251374
#>     Attrib hp    0.38945471802337484
#>     Attrib qsec    -0.04828058275488435
#>     Attrib vs    0.0175242844714998
#>     Attrib wt    0.4045560030037958
#> Sigmoid Node 2
#>     Inputs    Weights
#>     Threshold    -1.3054215723166336
#>     Attrib am    -0.10173176271082028
#>     Attrib carb    1.2283983504305562
#>     Attrib cyl    0.9161844128592822
#>     Attrib disp    0.319758749669592
#>     Attrib drat    -1.7460159326428237
#>     Attrib gear    1.5884060429038862
#>     Attrib hp    -0.354369950417324
#>     Attrib qsec    -0.05865682152860223
#>     Attrib vs    0.4425949704031995
#>     Attrib wt    1.2997330357081411
#> Sigmoid Node 3
#>     Inputs    Weights
#>     Threshold    -1.6178700118903588
#>     Attrib am    0.8627326582399635
#>     Attrib carb    0.9864767643990782
#>     Attrib cyl    -0.9835492747706772
#>     Attrib disp    -0.4358867571821705
#>     Attrib drat    0.24531063369974665
#>     Attrib gear    0.8195577620654009
#>     Attrib hp    1.056089912670927
#>     Attrib qsec    1.4191254593774616
#>     Attrib vs    0.5024076016340825
#>     Attrib wt    0.8490025084796262
#> Sigmoid Node 4
#>     Inputs    Weights
#>     Threshold    -1.4024449423572305
#>     Attrib am    0.946395811639127
#>     Attrib carb    0.923718297008592
#>     Attrib cyl    -0.9529260575391052
#>     Attrib disp    -0.3776451665459604
#>     Attrib drat    -0.2680632925829612
#>     Attrib gear    0.6693624038680632
#>     Attrib hp    1.0186621686914727
#>     Attrib qsec    1.161472596757883
#>     Attrib vs    0.2271580805477153
#>     Attrib wt    0.6728148897907154
#> Sigmoid Node 5
#>     Inputs    Weights
#>     Threshold    -1.3086663787325548
#>     Attrib am    -0.3356710373893209
#>     Attrib carb    0.49162912337541154
#>     Attrib cyl    0.011005571250425308
#>     Attrib disp    0.11216431729395367
#>     Attrib drat    -0.7486993845229463
#>     Attrib gear    -0.025236183959187076
#>     Attrib hp    -0.3177208502825204
#>     Attrib qsec    0.17497596543902041
#>     Attrib vs    0.3819237684808749
#>     Attrib wt    0.3904391222394063
#> 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 
#> 40.68853