mlr-org / mlr3filters

Filter-based feature selection for mlr3
https://mlr3filters.mlr-org.com
GNU Lesser General Public License v3.0
20 stars 8 forks source link

Add 'surv' task_type in `FindCorrelation` filter #151

Closed bblodfon closed 1 year ago

bblodfon commented 1 year ago

FindCorrelation filter should support also survival tasks (easy to fix), see below:

library(mlr3proba)
#> Loading required package: mlr3
library(mlr3filters)
library(mlr3pipelines)

task = tsk('lung')
pre = po('encode', method = 'treatment') %>>%
  po('imputelearner', lrn('regr.rpart'))
task = pre$train(task)[[1]]

flt('find_correlation')$calculate(task)
#> Error: Filter 'find_correlation' does not support the type 'surv' of task 'lung'

Created on 2023-02-24 with reprex v2.0.2

bblodfon commented 1 year ago

fixed in https://github.com/mlr-org/mlr3filters/pull/152