Open
Description
Whenever I $filter()
a task, the task still contains a reference to the whole dataset because we create a view, and don't materialize the subset.
library(mlr3)
task = tgen("spirals")$generate(1000000)
task = task$filter(1:100)
length(task$backend$rownames)
#> 1000000
In many cases this is nice, but there are also cases where one wants to materialize such a view on a backend, primarily for efficiency.
Essentially, this would do something like:
task$backend = task$backend(task$row_ids, task$backend$colnames)
I suggest we add a method $materialize()
that does exactly this.
Metadata
Metadata
Assignees
Labels
No labels