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.726753583423911
#>     Node 1    0.7473042132161005
#>     Node 2    -1.6780318069410605
#>     Node 3    1.9876406550434365
#>     Node 4    1.4302424222141494
#>     Node 5    0.771628493428028
#> Sigmoid Node 1
#>     Inputs    Weights
#>     Threshold    -0.8958037716371264
#>     Attrib am    0.14612351686478478
#>     Attrib carb    0.13245819780390927
#>     Attrib cyl    0.013836375674023772
#>     Attrib disp    0.7530429229385965
#>     Attrib drat    0.13734011994550874
#>     Attrib gear    0.5171013829019511
#>     Attrib hp    0.4560156932368051
#>     Attrib qsec    0.3916006957472461
#>     Attrib vs    -0.07801369566673287
#>     Attrib wt    0.2856956977541658
#> Sigmoid Node 2
#>     Inputs    Weights
#>     Threshold    -1.825472766423012
#>     Attrib am    1.0609314623144308
#>     Attrib carb    1.567401128512153
#>     Attrib cyl    0.07125018928159123
#>     Attrib disp    0.8262008377282593
#>     Attrib drat    0.7131884328151826
#>     Attrib gear    -0.1356590718040045
#>     Attrib hp    1.6340924250134725
#>     Attrib qsec    0.027824288393858983
#>     Attrib vs    0.2297458763546777
#>     Attrib wt    1.922353030564446
#> Sigmoid Node 3
#>     Inputs    Weights
#>     Threshold    -2.2802244266687524
#>     Attrib am    1.647067914687276
#>     Attrib carb    0.5445392594312892
#>     Attrib cyl    0.08071449100080226
#>     Attrib disp    -0.6842348584609741
#>     Attrib drat    0.3815676914775859
#>     Attrib gear    0.9242523817901955
#>     Attrib hp    0.6112210707532194
#>     Attrib qsec    2.1502519299515193
#>     Attrib vs    0.7747788453398886
#>     Attrib wt    0.7306827747705306
#> Sigmoid Node 4
#>     Inputs    Weights
#>     Threshold    -1.8444755848093515
#>     Attrib am    1.393825393341177
#>     Attrib carb    -0.17344917329022463
#>     Attrib cyl    -0.11297993228727722
#>     Attrib disp    -0.11474748345933802
#>     Attrib drat    0.31397125442829
#>     Attrib gear    0.5218996463656524
#>     Attrib hp    0.5161989937205069
#>     Attrib qsec    1.7775956586900696
#>     Attrib vs    -0.01924118306922032
#>     Attrib wt    0.24409454344982168
#> Sigmoid Node 5
#>     Inputs    Weights
#>     Threshold    -0.8083970384330106
#>     Attrib am    0.18402880380473488
#>     Attrib carb    0.16810257520061234
#>     Attrib cyl    0.08206069831774826
#>     Attrib disp    0.7030832246174056
#>     Attrib drat    0.18161916420349944
#>     Attrib gear    0.5146159560764874
#>     Attrib hp    0.4878114053638819
#>     Attrib qsec    0.4226405429410929
#>     Attrib vs    -0.04184217341020344
#>     Attrib wt    0.28244370690010795
#> 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 
#>  31.0337