We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PipeOpUpdateTarget
library(mlr3proba) #> Loading required package: mlr3 task = tsk('lung') trgs = task$data(cols = task$target_names) trgs #> time status #> 1: 306 TRUE #> 2: 455 TRUE #> 3: 1010 FALSE #> 4: 210 TRUE #> 5: 883 TRUE #> --- #> 224: 188 FALSE #> 225: 191 FALSE #> 226: 105 FALSE #> 227: 174 FALSE #> 228: 177 FALSE trafo_fun = function(x) { x$time = ceiling(x$time / 7) # change time from days to weeks x } trafo_fun(trgs) # works #> time status #> 1: 44 TRUE #> 2: 65 TRUE #> 3: 145 FALSE #> 4: 30 TRUE #> 5: 127 TRUE #> --- #> 224: 27 FALSE #> 225: 28 FALSE #> 226: 15 FALSE #> 227: 25 FALSE #> 228: 26 FALSE pout = mlr3pipelines:::PipeOpUpdateTarget$new(param_vals = list(trafo = trafo_fun)) pout$train(list(task)) # doesn't work #> Error in initialize(...): unused argument (target = c("time", "status")) #> This happened PipeOp update_target's $train()
Created on 2023-09-05 with reprex v2.0.2
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Created on 2023-09-05 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: