`R/FilterCarScore.R`

`mlr_filters_carscore.Rd`

Calculates the Correlation-Adjusted (marginal) coRelation scores
(short CAR scores) implemented in `care::carscore()`

in package
care. The CAR scores for a set of features are defined as the
correlations between the target and the decorrelated features. The filter
returns the absolute value of the calculated scores.

Argument `verbose`

defaults to `FALSE`

.

Dictionary of Filters: mlr_filters

Other Filter:
`Filter`

,
`mlr_filters_anova`

,
`mlr_filters_auc`

,
`mlr_filters_cmim`

,
`mlr_filters_correlation`

,
`mlr_filters_disr`

,
`mlr_filters_find_correlation`

,
`mlr_filters_importance`

,
`mlr_filters_information_gain`

,
`mlr_filters_jmim`

,
`mlr_filters_jmi`

,
`mlr_filters_kruskal_test`

,
`mlr_filters_mim`

,
`mlr_filters_mrmr`

,
`mlr_filters_njmim`

,
`mlr_filters_performance`

,
`mlr_filters_variance`

,
`mlr_filters`

`mlr3filters::Filter`

-> `FilterCarScore`

`new()`

Create a FilterCarScore object.

FilterCarScore$new( id = "carscore", task_type = "regr", param_set = ParamSet$new(list(ParamDbl$new("lambda", lower = 0, upper = 1, default = NO_DEF), ParamLgl$new("diagonal", default = FALSE), ParamLgl$new("verbose", default = TRUE))), packages = "care", feature_types = "numeric" )

`id`

(

`character(1)`

)

Identifier for the filter.`task_type`

(

`character()`

)

Types of the task the filter can operator on. E.g.,`"classif"`

or`"regr"`

.`param_set`

(paradox::ParamSet)

Set of hyperparameters.`packages`

(

`character()`

)

Set of required packages. Note that these packages will be loaded via`requireNamespace()`

, and are not attached.`feature_types`

(

`character()`

)

Feature types the filter operates on. Must be a subset of`mlr_reflections$task_feature_types`

.

`clone()`

The objects of this class are cloneable with this method.

FilterCarScore$clone(deep = FALSE)

`deep`

Whether to make a deep clone.

task = mlr3::tsk("mtcars") filter = flt("carscore") filter$calculate(task) head(as.data.table(filter), 3)#> feature score #> 1: wt 0.4144012 #> 2: hp 0.3174307 #> 3: cyl 0.3102745## changing filter settings filter = flt("carscore") filter$param_set$values = list("diagonal" = TRUE) filter$calculate(task)#> Estimating optimal shrinkage intensity lambda (correlation matrix): 0.0707#> feature score #> 1: wt 0.8062818 #> 2: cyl 0.7918806 #> 3: disp 0.7875962