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.07570234496316243
#>     Node 1    -0.918840376857143
#>     Node 2    -1.1917500782442292
#>     Node 3    1.9968651822263856
#>     Node 4    1.3160175451189677
#>     Node 5    0.11113497922754798
#> Sigmoid Node 1
#>     Inputs    Weights
#>     Threshold    -0.6446201745796042
#>     Attrib am    0.7330130913986805
#>     Attrib carb    1.1614711046285597
#>     Attrib cyl    -0.3328449716199986
#>     Attrib disp    0.0025179383361567387
#>     Attrib drat    -0.5799870341689947
#>     Attrib gear    0.336035962127614
#>     Attrib hp    -0.35822689631975807
#>     Attrib qsec    -0.0019555053563161777
#>     Attrib vs    -0.522143132687912
#>     Attrib wt    0.048121695774856026
#> Sigmoid Node 2
#>     Inputs    Weights
#>     Threshold    0.5858929357543224
#>     Attrib am    0.6413621406354496
#>     Attrib carb    2.1171037977360676
#>     Attrib cyl    -0.48102391739339573
#>     Attrib disp    -0.344268104210323
#>     Attrib drat    -0.918125302319758
#>     Attrib gear    0.38636202726463337
#>     Attrib hp    -0.789885052966781
#>     Attrib qsec    -0.25321597921511446
#>     Attrib vs    -0.8120219466138805
#>     Attrib wt    0.196066337327231
#> Sigmoid Node 3
#>     Inputs    Weights
#>     Threshold    -2.50430529001004
#>     Attrib am    1.294097265003915
#>     Attrib carb    0.10485216327316166
#>     Attrib cyl    0.7837079891154759
#>     Attrib disp    -0.33629274859664315
#>     Attrib drat    0.1380875034461899
#>     Attrib gear    1.7425091065599219
#>     Attrib hp    0.02161907675759177
#>     Attrib qsec    2.210638741128006
#>     Attrib vs    -0.7495033767967849
#>     Attrib wt    -2.4565422687861305
#> Sigmoid Node 4
#>     Inputs    Weights
#>     Threshold    -2.2878093394772194
#>     Attrib am    0.7650186994552152
#>     Attrib carb    -0.03243888984552668
#>     Attrib cyl    0.8499419897876074
#>     Attrib disp    0.3015853623859835
#>     Attrib drat    0.04839228506254863
#>     Attrib gear    0.9937817094928213
#>     Attrib hp    0.1738692931525801
#>     Attrib qsec    1.7337636857863608
#>     Attrib vs    -0.16680932807076446
#>     Attrib wt    -1.9759178430611921
#> Sigmoid Node 5
#>     Inputs    Weights
#>     Threshold    -1.1297361487558424
#>     Attrib am    -0.020854462055928034
#>     Attrib carb    0.16393855862565518
#>     Attrib cyl    0.0316543075650903
#>     Attrib disp    0.12909057630688178
#>     Attrib drat    0.33276838644889717
#>     Attrib gear    0.025911506808623235
#>     Attrib hp    0.2321492246440078
#>     Attrib qsec    0.4163584843603366
#>     Attrib vs    0.40100861285907036
#>     Attrib wt    -0.11875938942764655
#> 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 
#> 21.69963