Description Usage Arguments Value See Also Examples
Convert a binary TaskClassif or TaskClassifST to a TaskRegr, optionally oversampling the minority class first.
1 | convert_clastoregrtask(in_task, in_id, oversample = FALSE)
|
in_task |
TaskClassif or TaskClassifST |
in_id |
the id of the output task |
oversample |
(logical) whether to oversample minority class beforehand (this is not exactly equivalent to a PipeOp) but oversample PipeOp is not yet available for regression tasks. If TRUE, will oversample so that classes are equally represented in task. |
a TaskRegr
1 2 3 4 5 6 | ## Not run:
in_dt <- data.table(intermittent=c(rep(0, 300), rep(1, 300)))
task = mlr3::TaskClassif$new(id = "task_classif", backend = in_dt, target ='intermittent')
convert_clastoregrtask(task, id="task_regr")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.