New PipeOp inheriting from PipeOpTaskPreprocSimple.
This works by calling apply on the task data with FUN = applicator (param of the PO) and simplify = TRUE. This should return a matrix or a vector. If a list is returned, an error is thrown.
The rest of the code is there
to handle the differences between vectors and matrices returned by apply.
to create column names automatically, that might have been dropped by apply (depends on the applicator).
to handle tasks with zero rows.
Tests might be a bit too excessive (?), I tried to cover all the points I talked about with @mb706.
Closes https://github.com/mlr-org/mlr3pipelines/issues/318
New PipeOp inheriting from
PipeOpTaskPreprocSimple
. This works by callingapply
on the task data withFUN = applicator
(param of the PO) andsimplify = TRUE
. This should return a matrix or a vector. If a list is returned, an error is thrown. The rest of the code is thereapply
.apply
(depends on theapplicator
).Tests might be a bit too excessive (?), I tried to cover all the points I talked about with @mb706.