ANS: Adaptive Neighbor Synthetic Majority Oversampling TEchnique

Description Usage Arguments Value Author(s) References Examples

View source: R/ANS.R

Description

Generate a oversampling dataset from imbalanced dataset using Adaptive Neighbor SMOTE which provides the parameter K to each minority instance automatically

Usage

1
ANS(X, target, dupSize = 0)

Arguments

X

A data frame or matrix of numeric-attributed dataset

target

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

dupSize

A number of vector representing the desired times of synthetic minority instances over the original number of majority instances, 0 for balanced dataset.

Value

data

A resulting dataset consists of original minority instances, synthetic minority instances and original majority instances with a vector of their respective target class appended at the last column

syn_data

A set of synthetic minority instances with a vector of minority target class appended at the last column

orig_N

A set of original instances whose class is not oversampled with a vector of their target class appended at the last column

orig_P

A set of original instances whose class is oversampled with a vector of their target class appended at the last column

K

A vector of parameter K for each minority instance

K_all

The value of parameter C for nearest neighbor process used for identifying outcasts

dup_size

The maximum times of synthetic minority instances over original majority instances in the oversampling

outcast

A set of original minority instances which is defined as minority outcast

eps

The value of eps which determines automatic K

method

The name of oversampling method used for this generated dataset (ANS)

Author(s)

Wacharasak Siriseriwan <wacharasak.s@gmail.com>

References

Siriseriwan, W. and Sinapiromsaran, K. Adaptive neighbor Synthetic Minority Oversampling TEchnique under 1NN outcast handling.Songklanakarin Journal of Science and Technology.

Examples

1
2
	data_example = sample_generator(5000,ratio = 0.80)
	genData = ANS(data_example[,-3],data_example[,3])

smotefamily documentation built on May 30, 2019, 9:01 a.m.