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

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

LearnerClassifLogistic$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

# Define the Learner
learner = mlr3::lrn("classif.logistic")
print(learner)
#> <LearnerClassifLogistic:classif.logistic>: Multinomial Logistic Regression
#> * Model: -
#> * Parameters: list()
#> * Packages: mlr3, RWeka
#> * Predict Types:  [response], prob
#> * Feature Types: logical, integer, numeric, factor, ordered
#> * Properties: missings, multiclass, twoclass

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

# 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)
#> Logistic Regression with ridge parameter of 1.0E-8
#> Coefficients...
#>                               Class
#> Variable                          M
#> ===================================
#> V1                         856.0409
#> V10                        100.2502
#> V11                        105.2337
#> V12                         56.4104
#> V13                       -121.8524
#> V14                         80.3019
#> V15                        -69.6213
#> V16                        -38.2395
#> V17                        -92.7346
#> V18                         42.4048
#> V19                         36.3077
#> V2                         410.3048
#> V20                        -35.9832
#> V21                         58.3616
#> V22                        106.5182
#> V23                        -52.0949
#> V24                        -22.3707
#> V25                        -14.7983
#> V26                         94.3053
#> V27                         24.3595
#> V28                       -192.7841
#> V29                        185.9052
#> V3                        -576.9742
#> V30                         53.0785
#> V31                       -177.4892
#> V32                         83.5197
#> V33                         18.9019
#> V34                       -182.7588
#> V35                        122.6429
#> V36                        -78.0392
#> V37                          5.8686
#> V38                        -69.6639
#> V39                         -0.9766
#> V4                        -125.4748
#> V40                          61.802
#> V41                         10.8965
#> V42                        -102.747
#> V43                         211.003
#> V44                        -13.9314
#> V45                        -79.4387
#> V46                        -17.5956
#> V47                        343.4199
#> V48                          175.06
#> V49                         287.178
#> V5                         368.8382
#> V50                      -2264.8163
#> V51                         171.111
#> V52                       3549.4015
#> V53                       -746.4393
#> V54                        367.5736
#> V55                      -1869.2159
#> V56                       2299.5509
#> V57                      -1832.7964
#> V58                      -1134.1294
#> V59                        3298.438
#> V6                         -97.8123
#> V60                        121.6509
#> V7                          83.1975
#> V8                        -377.2979
#> V9                         261.4174
#> Intercept                 -126.7289
#> 
#> 
#> Odds Ratios...
#>                               Class
#> Variable                          M
#> ===================================
#> V1                         Infinity
#> V10            3.452366966647695E43
#> V11           5.0400319224602517E45
#> V12           3.1529522850058986E24
#> V13                               0
#> V14            7.492989424716826E34
#> V15                               0
#> V16                               0
#> V17                               0
#> V18           2.6070569419691699E18
#> V19            5.864684141094729E15
#> V2           1.5599133015846083E178
#> V20                               0
#> V21            2.218769626449977E25
#> V22           1.8208527953856137E46
#> V23                               0
#> V24                               0
#> V25                               0
#> V26            9.042140111945935E40
#> V27            3.794921438961709E10
#> V28                               0
#> V29            5.465090114317463E80
#> V3                                0
#> V30           1.1263687097466933E23
#> V31                               0
#> V32           1.8712953152114344E36
#> V33                  161797934.3905
#> V34                               0
#> V35            1.832953454082363E53
#> V36                               0
#> V37                        353.7497
#> V38                               0
#> V39                          0.3766
#> V4                                0
#> V40            6.922390553532315E26
#> V41                      53984.5659
#> V42                               0
#> V43            4.339691112819297E91
#> V44                               0
#> V45                               0
#> V46                               0
#> V47          1.3975656815521995E149
#> V48           1.0656346751270499E76
#> V49           5.245685892129216E124
#> V5           1.5289127478441933E160
#> V50                               0
#> V51           2.0538505381952173E74
#> V52                        Infinity
#> V53                               0
#> V54           4.316957223260946E159
#> V55                               0
#> V56                        Infinity
#> V57                               0
#> V58                               0
#> V59                        Infinity
#> V6                                0
#> V60             6.79687672216178E52
#> V7            1.3558644244958056E36
#> V8                                0
#> V9           3.4051604189735284E113
#> 


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

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