warpingUnder: warpingUnder function

Description Usage Arguments Value Examples

Description

Function used to asses the wrapping effect of undersampling on the posterior probability. use a large number of folds to make sure we use almost all the dataset for training

Usage

1
2
3
warpingUnder(formula, data, algo, task.id = "cv", positive = 1,
  costs = NULL, nCV = 10, B = 1, nFold = 100, ncore = 1,
  dirPlot = NA, verbose = TRUE, ...)

Arguments

formula

A formula of the form y ~ x1 + x2 + ...

data

Data frame from which variables specified in formula are preferentially to be taken

algo

classification algorithm supported by mlr package

task.id

name of the task

positive

value of the positive (minority) class

costs

cost matrix

nCV

number of repetation of the Cross Validation (CV)

B

number of models to create for each fold of the CV

nFold

number of folds of the CV

ncore

number of cores to use in multicore computation

dirPlot

directory where to save plots (set dirPlot=NA to avoid plots)

verbose

print extra information (logical variable)

...

extra parameters passed to mlr train function

Value

The function returns a list:

results

results of undersampling

probs

probabilities

mres

mres

meltResALL

meltResALL

Examples

1
2
3
4
library(mlbench)
data(Ionosphere)
library(warping)
res <- warpingUnder(Class ~., Ionosphere, "randomForest", task.id="rf_Ionosphere", positive="bad", nCV=3, B=1, nFold=5)

dalpozz/warping documentation built on May 14, 2019, 3:32 p.m.