smoteNew: smoteNew is a necessary function that modifies the SMOTE...

Description Usage Arguments Author(s) Examples

Description

smoteNewis a necessary function that modifies the SMOTE algorithm in the following ways: (1) correct bug in original smotefamily::SMOTE() function and (2) lets the user specifiy which class to be oversampled.

Usage

1
smoteNew(data.x, data.y, K, dup_size = 0, class.to.oversample)

Arguments

data.x

A data frame or matrix of numeric-attributed dataset

data.y

A vector of a target class attribute corresponding to a dataset X

K

The number of nearest neighbors during sampling process

dup_size

The number or vector representing the desired times of synthetic minority instances over the original number of majority instances

class.to.oversample

Class to be oversampled

Author(s)

Norbert Krautenbacher, Kevin Strauss, Maximilian Mandl, Christiane Fuchs

Examples

1
2
3
4
library(smotefamily)
library(sambia)
data.example = sample_generator(10000,ratio = 0.80)
genData = sambia:::smoteNew(data.example[,-3],data.example[,3],K = 5,class.to.oversample = 'p')

sambia documentation built on May 2, 2019, 9:15 a.m.

Related to smoteNew in sambia...