Classification Logistic Regression Learner
mlr_learners_classif.logistic.Rd
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
Parameters
Id | Type | Default | Levels | Range |
subset | untyped | - | - | |
na.action | untyped | - | - | |
C | logical | FALSE | TRUE, FALSE | - |
R | numeric | - | \((-\infty, \infty)\) | |
M | integer | -1 | \((-\infty, \infty)\) | |
output_debug_info | logical | FALSE | TRUE, FALSE | - |
do_not_check_capabilities | logical | FALSE | TRUE, FALSE | - |
num_decimal_places | integer | 2 | \([1, \infty)\) | |
batch_size | integer | 100 | \([1, \infty)\) | |
options | untyped | NULL | - |
References
le Cessie, S., van Houwelingen, J.C. (1992). “Ridge Estimators in Logistic Regression.” Applied Statistics, 41(1), 191-201.
See also
as.data.table(mlr_learners)
for a table of available Learners in the running session (depending on the loaded packages).Chapter in the mlr3book: https://mlr3book.mlr-org.com/basics.html#learners
mlr3learners for a selection of recommended learners.
mlr3cluster for unsupervised clustering learners.
mlr3pipelines to combine learners with pre- and postprocessing steps.
mlr3tuning for tuning of hyperparameters, mlr3tuningspaces for established default tuning spaces.
Super classes
mlr3::Learner
-> mlr3::LearnerClassif
-> LearnerClassifLogistic
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 453.4184
#> V10 -133.7968
#> V11 191.1933
#> V12 -19.4438
#> V13 121.512
#> V14 -101.6786
#> V15 17.1232
#> V16 1.5217
#> V17 -148.978
#> V18 148.0813
#> V19 -106.6291
#> V2 -85.5374
#> V20 137.175
#> V21 -112.4901
#> V22 -2.5949
#> V23 163.2242
#> V24 -81.4585
#> V25 16.481
#> V26 12.2917
#> V27 -37.1483
#> V28 15.5923
#> V29 -20.2377
#> V3 -214.2644
#> V30 136.07
#> V31 -317.9738
#> V32 227.0498
#> V33 -68.8431
#> V34 -73.8549
#> V35 119.6303
#> V36 -178.2345
#> V37 66.7009
#> V38 -1.2016
#> V39 91.7845
#> V4 -13.3527
#> V40 -155.497
#> V41 55.4502
#> V42 -20.1281
#> V43 74.5815
#> V44 -43.9613
#> V45 35.3743
#> V46 -112.5375
#> V47 177.3002
#> V48 269.7603
#> V49 911.4082
#> V5 159.2952
#> V50 -2002.7006
#> V51 560.9657
#> V52 200.6075
#> V53 1442.989
#> V54 -352.1258
#> V55 -2057.1896
#> V56 270.1844
#> V57 -2351.2458
#> V58 1157.7043
#> V59 3532.8815
#> V6 -212.4757
#> V60 334.5302
#> V7 127.7981
#> V8 -301.3335
#> V9 304.0744
#> Intercept -60.1048
#>
#>
#> Odds Ratios...
#> Class
#> Variable M
#> ===================================
#> V1 8.262765577225869E196
#> V10 0
#> V11 1.0819462624689283E83
#> V12 0
#> V13 5.915512696885996E52
#> V14 0
#> V15 27321400.2877
#> V16 4.58
#> V17 0
#> V18 2.0460017476027226E64
#> V19 0
#> V2 0
#> V20 3.7526180159380686E59
#> V21 0
#> V22 0.0747
#> V23 7.715518147182049E70
#> V24 0
#> V25 14374852.1072
#> V26 217872.9229
#> V27 0
#> V28 5910587.7238
#> V29 0
#> V3 0
#> V30 1.2428861857571876E59
#> V31 0
#> V32 4.040984930443973E98
#> V33 0
#> V34 0
#> V35 9.010909524425405E51
#> V36 0
#> V37 9.286528820241481E28
#> V38 0.3007
#> V39 7.269591221779289E39
#> V4 0
#> V40 0
#> V41 1.2070599826367948E24
#> V42 0
#> V43 2.4566576454591934E32
#> V44 0
#> V45 2.30599388480372E15
#> V46 0
#> V47 1.0011205373205385E77
#> V48 1.4301901957832856E117
#> V49 Infinity
#> V5 1.5171800603218354E69
#> V50 0
#> V51 4.210315161425237E243
#> V52 1.3265474605861156E87
#> V53 Infinity
#> V54 0
#> V55 0
#> V56 2.1857915851145038E117
#> V57 0
#> V58 Infinity
#> V59 Infinity
#> V6 0
#> V60 1.9257597664430876E145
#> V7 3.177059527466585E55
#> V8 0
#> V9 1.14240759783648E132
#>
# Make predictions for the test rows
predictions = learner$predict(task, row_ids = ids$test)
# Score the predictions
predictions$score()
#> classif.ce
#> 0.2608696