mlr-org / mlr3

mlr3: Machine Learning in R - next generation
https://mlr3.mlr-org.com
GNU Lesser General Public License v3.0
936 stars 85 forks source link

column info of task is not updated when subsetting features #946

Closed sebffischer closed 1 month ago

sebffischer commented 1 year ago
library(mlr3)

task = tsk("iris")
task$select(c("Petal.Length"))
task$col_info
#>              id    type                      levels label fix_factor_levels
#> 1:     ..row_id integer                              <NA>             FALSE
#> 2: Petal.Length numeric                              <NA>             FALSE
#> 3:  Petal.Width numeric                              <NA>             FALSE
#> 4: Sepal.Length numeric                              <NA>             FALSE
#> 5:  Sepal.Width numeric                              <NA>             FALSE
#> 6:      Species  factor setosa,versicolor,virginica  <NA>             FALSE

Created on 2023-07-17 with reprex v2.0.2