mlr-org / mlr3pipelines

Dataflow Programming for Machine Learning in R
https://mlr3pipelines.mlr-org.com/
GNU Lesser General Public License v3.0
137 stars 25 forks source link

make single pipeop application easier #683

Open mb706 opened 2 years ago

mb706 commented 2 years ago
p = po("encode")
task_preproc = p$train(list(task))[[1]]
mb706 commented 2 years ago

potential problem: we don't want to tempt people into doing the wrong kind of preprocessing on train and test set

mb706 commented 2 years ago

suggestion (bb):

outdata = preproc("encode", indata, paramlist, state = state)
mb706 commented 2 years ago

maybe we want to have preproc(po("encode", paramlist)) instead, more consistent and would also work with PipeOps that are not in po().

mb706 commented 1 month ago

could also overload the %>>% operator here.

mb706 commented 5 hours ago

maybe: whenever state is given, or when optional var predict = TRUE (default FALSE) do prediction, otherwise training. We live with the fact that the state gets saved to the 1st arg pipeop. No reason not to make this work with graphs as well.