+
Skip to content

Feature Request: Add method to materialize Task view #1304

Open
@sebffischer

Description

@sebffischer

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载