convert_clastoregrtask: Convert classification task to regression task

Description Usage Arguments Value See Also Examples

Description

Convert a binary TaskClassif or TaskClassifST to a TaskRegr, optionally oversampling the minority class first.

Usage

1
convert_clastoregrtask(in_task, in_id, oversample = FALSE)

Arguments

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.

Value

a TaskRegr

See Also

create_tasks

Examples

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)

NaiaraLopezRojo/globalIRmap documentation built on Dec. 17, 2021, 5:19 a.m.