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.560808645183091
#>     Node 1    0.6794721620276186
#>     Node 2    -0.7269665596996215
#>     Node 3    0.481258774873171
#>     Node 4    2.443590064971966
#>     Node 5    0.0879941450956432
#> Sigmoid Node 1
#>     Inputs    Weights
#>     Threshold    -1.8356536292882855
#>     Attrib am    -0.4955209892207387
#>     Attrib carb    0.06577980201272357
#>     Attrib cyl    -0.008970469356782381
#>     Attrib disp    -0.04162538368234378
#>     Attrib drat    -0.2535861924368649
#>     Attrib gear    1.1265991789423278
#>     Attrib hp    -1.0401117432881977
#>     Attrib qsec    0.4709592701682015
#>     Attrib vs    0.36140516027183306
#>     Attrib wt    -0.1645436487435795
#> Sigmoid Node 2
#>     Inputs    Weights
#>     Threshold    -0.7755740671773823
#>     Attrib am    1.1079001881741335
#>     Attrib carb    1.317050138764681
#>     Attrib cyl    -0.6928984077747701
#>     Attrib disp    1.2541324318541969
#>     Attrib drat    0.30986764002772127
#>     Attrib gear    0.0013964993300730182
#>     Attrib hp    0.480890573122047
#>     Attrib qsec    -1.415597653807995
#>     Attrib vs    0.4518173775610714
#>     Attrib wt    0.15999904325492828
#> Sigmoid Node 3
#>     Inputs    Weights
#>     Threshold    -2.318931912619057
#>     Attrib am    0.43771699673426706
#>     Attrib carb    0.24958856482304917
#>     Attrib cyl    0.5188588672652057
#>     Attrib disp    -0.22528633021383465
#>     Attrib drat    -0.2531868833271734
#>     Attrib gear    1.1606188682849188
#>     Attrib hp    -0.7898217225447148
#>     Attrib qsec    0.975646922875987
#>     Attrib vs    0.09405749391798633
#>     Attrib wt    -0.4895004266512538
#> Sigmoid Node 4
#>     Inputs    Weights
#>     Threshold    -3.3130226030561247
#>     Attrib am    2.5067228541888564
#>     Attrib carb    0.6185043600173918
#>     Attrib cyl    1.3324825293968172
#>     Attrib disp    -0.7959163904517365
#>     Attrib drat    -0.020375930208315053
#>     Attrib gear    1.4193820496895533
#>     Attrib hp    -0.35624663002888984
#>     Attrib qsec    3.392697846471277
#>     Attrib vs    -0.12070671625188532
#>     Attrib wt    -1.0498354429723422
#> Sigmoid Node 5
#>     Inputs    Weights
#>     Threshold    -1.8749017737015472
#>     Attrib am    0.16272402329155725
#>     Attrib carb    0.060901882019846046
#>     Attrib cyl    0.5070635072428823
#>     Attrib disp    -0.025037291917916257
#>     Attrib drat    -0.06691950894290916
#>     Attrib gear    0.9574447919560831
#>     Attrib hp    -0.5017698839888579
#>     Attrib qsec    0.7908548964806204
#>     Attrib vs    0.1339213084841994
#>     Attrib wt    -0.31974475196971547
#> 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 
#> 20.17375