Linear Regression with Exhaustive Search
Source:R/learner_ExhaustiveSearch_regr_lm.R
mlr_learners_regr.exhaustive_search.Rd
Linear Regression, where the features used in the model are selected by running Exhaustive Search.
Calls ExhaustiveSearch::ExhaustiveSearch()
from ExhaustiveSearch.
Initial parameter values
family
:Actual default: NULL
Adjusted default: "gaussian"
Reason for change: To comply with mlr3 architecture, we differentiate between classification and regression learners.
nThreads
:Actual default: NULL
Adjusted default: 1
Reason for change: Suppressing the automatic internal parallelization if
cv.folds
> 0.
quietly
:Actual default: FALSE
Adjusted default: TRUE
Reason for change: Suppression of constant printing to console
Meta Information
Task type: “regr”
Predict Types: “response”, “se”
Feature Types: “logical”, “integer”, “numeric”
Required Packages: mlr3, mlr3extralearners, ExhaustiveSearch
Parameters
Id | Type | Default | Levels | Range |
family | character | - | gaussian, binomial | - |
performanceMeasure | character | - | MSE, AIC | - |
combsUpTo | integer | - | \([1, \infty)\) | |
nResults | integer | 5000 | \([1, \infty)\) | |
nThreads | integer | - | \([1, \infty)\) | |
testSetIDs | integer | - | \([1, \infty)\) | |
errorVal | untyped | -1 | - | |
quietly | logical | - | TRUE, FALSE | - |
checkLarge | logical | TRUE | TRUE, FALSE | - |
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::LearnerRegr
-> LearnerRegrExhaustiveSearch
Methods
Inherited methods
Examples
# define learner
learner = LearnerRegrExhaustiveSearch$new()
learner$predict_type = "se"
# define task
tsk_cars = tsk("mtcars")
# train learner
learner$train(tsk_cars)
# extract selected features
learner$selected_features()
#> [1] "am" "qsec" "wt"
# predict on training task
learner$predict(tsk_cars)
#>
#> ── <PredictionRegr> for 32 observations: ───────────────────────────────────────
#> row_ids truth response se
#> 1 21.0 22.47046 0.7196757
#> 2 21.0 22.15825 0.7435033
#> 3 22.8 26.28107 0.7597707
#> --- --- --- ---
#> 30 19.7 20.70613 0.8295549
#> 31 15.0 16.46963 1.0745511
#> 32 21.4 24.46722 0.8668433