I have a mlr3 task, where I have dataset like this:
Dataset "all"
all <- data.frame(v1 = c("a", "b"),
v2 = c(1, 2),
data = c("test", "train"))
library(mlr3)
task <- TaskClassif$new("loan", all, target = "v1")
How could I filter task by column "data" value "train"?
I tried task$filter(data == "train") and a lot of other combinations, but don't work.
dput(task)
<environment>
str(task)
Classes 'TaskClassif', 'TaskSupervised', 'Task', 'R6' <TaskClassif:loan>
dput
of the example – akrun