Skip to contents

We auto-set the target column, drop any column which is called “Id” and convert logicals to factors.

Usage

convertMLBenchObjToTask(x, n = 100L, ...)

Arguments

x

(character(1))
Name of an mlbench function or dataset.

n

(integer(1))
Number of observations for data simul functions. Note that for a few mlbench function this setting is not exactly respected by mlbench. Default is 100.

...

(any)
Passed on to data simul functions.

Examples

print(convertMLBenchObjToTask("Ionosphere"))
#> Supervised task: Ionosphere
#> Type: classif
#> Target: Class
#> Observations: 351
#> Features:
#>    numerics     factors     ordered functionals 
#>          32           2           0           0 
#> Missings: FALSE
#> Has weights: FALSE
#> Has blocking: FALSE
#> Has coordinates: FALSE
#> Classes: 2
#>  bad good 
#>  126  225 
#> Positive class: bad
print(convertMLBenchObjToTask("mlbench.spirals", n = 100, sd = 0.1))
#> Supervised task: mlbench.spirals
#> Type: classif
#> Target: classes
#> Observations: 100
#> Features:
#>    numerics     factors     ordered functionals 
#>           2           0           0           0 
#> Missings: FALSE
#> Has weights: FALSE
#> Has blocking: FALSE
#> Has coordinates: FALSE
#> Classes: 2
#>  1  2 
#> 50 50 
#> Positive class: 1