Skip to contents

Multinomial Logistic Regression model with a ridge estimator. Calls RWeka::Logistic() 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

Dictionary

This Learner can be instantiated via lrn():

lrn("classif.logistic")

Meta Information

  • Task type: “classif”

  • Predict Types: “response”, “prob”

  • Feature Types: “logical”, “integer”, “numeric”, “factor”, “ordered”

  • Required Packages: mlr3, RWeka

Parameters

IdTypeDefaultLevelsRange
subsetuntyped--
na.actionuntyped--
ClogicalFALSETRUE, FALSE-
Rnumeric-\((-\infty, \infty)\)
Minteger-1\((-\infty, \infty)\)
output_debug_infologicalFALSETRUE, FALSE-
do_not_check_capabilitieslogicalFALSETRUE, FALSE-
num_decimal_placesinteger2\([1, \infty)\)
batch_sizeinteger100\([1, \infty)\)
optionsuntypedNULL-

References

le Cessie, S., van Houwelingen, J.C. (1992). “Ridge Estimators in Logistic Regression.” Applied Statistics, 41(1), 191-201.

See also

Author

damirpolat

Super classes

mlr3::Learner -> mlr3::LearnerClassif -> LearnerClassifLogistic

Active bindings

marshaled

(logical(1))
Whether the learner has been marshaled.

Methods

Inherited methods


LearnerClassifLogistic$new()

Creates a new instance of this R6 class.


LearnerClassifLogistic$marshal()

Marshal the learner's model.

Usage

LearnerClassifLogistic$marshal(...)

Arguments

...

(any)
Additional arguments passed to mlr3::marshal_model().


LearnerClassifLogistic$unmarshal()

Unmarshal the learner's model.

Usage

LearnerClassifLogistic$unmarshal(...)

Arguments

...

(any)
Additional arguments passed to mlr3::unmarshal_model().


LearnerClassifLogistic$clone()

The objects of this class are cloneable with this method.

Usage

LearnerClassifLogistic$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

# Define the Learner
learner = lrn("classif.logistic")
print(learner)
#> 
#> ── <LearnerClassifLogistic> (classif.logistic): Multinomial Logistic Regression 
#> • Model: -
#> • Parameters: list()
#> • Packages: mlr3 and RWeka
#> • Predict Types: [response] and prob
#> • Feature Types: logical, integer, numeric, factor, and ordered
#> • Encapsulation: none (fallback: -)
#> • Properties: marshal, missings, multiclass, and twoclass
#> • Other settings: use_weights = 'error', predict_raw = 'FALSE'

# Define a Task
task = tsk("sonar")

# Create train and test set
ids = partition(task)

# Train the learner on the training ids
learner$train(task, row_ids = ids$train)

print(learner$model)
#> Logistic Regression with ridge parameter of 1.0E-8
#> Coefficients...
#>                               Class
#> Variable                          M
#> ===================================
#> V1                         323.3596
#> V10                        193.5686
#> V11                       -153.4277
#> V12                        216.5916
#> V13                        -15.5742
#> V14                        -15.9039
#> V15                        130.8642
#> V16                       -210.8154
#> V17                         25.6612
#> V18                         42.5593
#> V19                         59.5054
#> V2                          830.567
#> V20                        -23.5357
#> V21                        -79.7565
#> V22                         55.0909
#> V23                        -37.6231
#> V24                        164.8515
#> V25                        -47.2146
#> V26                         22.6388
#> V27                          1.7344
#> V28                       -147.0918
#> V29                         99.5803
#> V3                       -1095.3659
#> V30                        132.7938
#> V31                       -304.7755
#> V32                        137.3715
#> V33                        -64.8736
#> V34                        -53.2151
#> V35                        152.7622
#> V36                       -204.5545
#> V37                        -17.5409
#> V38                         53.8954
#> V39                          47.248
#> V4                         590.4092
#> V40                       -117.6406
#> V41                         61.5458
#> V42                       -145.4308
#> V43                         82.8929
#> V44                        -45.0279
#> V45                        195.9841
#> V46                        118.7283
#> V47                       -129.0452
#> V48                        257.3607
#> V49                        660.3115
#> V5                        -263.0591
#> V50                      -1987.2503
#> V51                      -1366.2747
#> V52                        282.5393
#> V53                        2280.501
#> V54                        289.8303
#> V55                       -922.6892
#> V56                      -2584.1821
#> V57                        476.4022
#> V58                       1568.6929
#> V59                      -1001.8544
#> V6                         167.0703
#> V60                       2689.5268
#> V7                        -482.7655
#> V8                        -113.6157
#> V9                         151.8838
#> Intercept                   -4.7332
#> 
#> 
#> Odds Ratios...
#>                               Class
#> Variable                          M
#> ===================================
#> V1            2.711901662063732E140
#> V10           1.1635541124171819E84
#> V11                               0
#> V12           1.1602321067530342E94
#> V13                               0
#> V14                               0
#> V15            6.817149999584377E56
#> V16                               0
#> V17           1.3948111535361716E11
#> V18           3.0427265990002586E18
#> V19            6.964066807798247E25
#> V2                         Infinity
#> V20                               0
#> V21                               0
#> V22            8.427291361198656E23
#> V23                               0
#> V24           3.9272817016202446E71
#> V25                               0
#> V26                 6790774040.6087
#> V27                          5.6653
#> V28                               0
#> V29           1.7667691844949539E43
#> V3                                0
#> V30            4.694576990772526E57
#> V31                               0
#> V32            4.567725809252614E59
#> V33                               0
#> V34                               0
#> V35            2.206965869867689E66
#> V36                               0
#> V37                               0
#> V38           2.5497126985352668E23
#> V39            3.307834628504685E20
#> V4           2.5790562369885942E256
#> V40                               0
#> V41           5.3578674548022626E26
#> V42                               0
#> V43            9.998612776125951E35
#> V44                               0
#> V45           1.3026385344952382E85
#> V46           3.6561802502507295E51
#> V47                               0
#> V48           5.892690626669916E111
#> V49            5.88334037975863E286
#> V5                                0
#> V50                               0
#> V51                               0
#> V52           5.073037102098811E122
#> V53                        Infinity
#> V54           7.442054729624848E125
#> V55                               0
#> V56                               0
#> V57            7.92259120391279E206
#> V58                        Infinity
#> V59                               0
#> V6            3.6115692952790794E72
#> V60                        Infinity
#> V7                                0
#> V8                                0
#> V9              9.16811045190399E65
#> 


# Make predictions for the test rows
predictions = learner$predict(task, row_ids = ids$test)

# Score the predictions
predictions$score()
#> classif.ce 
#>  0.2753623