SMOTE-class: SMOTE class

SMOTER Documentation

SMOTE class

Description

A class for to perform oversampling using SMOTE (Synthetic Minority Oversampling Technique).

Super class

deepANN::Sampler -> SMOTE

Public fields

k_neighbors

('integer()')

Methods

Public methods

Inherited methods

Method new()

Creates a new instance of this R6 class.

Usage
SMOTE$new(label = NA_character_, mode = c("auto"), k_neighbors = 3L)
Arguments
label

The label for the sampler object.

mode

Currently unused member.

k_neighbors

The number of nearest neighbors used to define the neighborhood of samples to use to generate the synthetic samples.


Method fit_resample()

SMOTE oversample the dataset.

Usage
SMOTE$fit_resample(X, y)
Arguments
X

Feature data set, usually a data.frame or an array of shape (n_samples, n_features).

y

Target data set, usually a column of a data.frame or an array which holds the corresponding label for each sample in X.

Returns

A list with X_resampled and y_resampled.


Method clone()

The objects of this class are cloneable with this method.

Usage
SMOTE$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

References

Chawla, N.V., Bowyer, K.W., Hall, L.O., & Kegelmeyer, W.P. (2000). SMOTE: Synthetic Minority Over-sampling Technique. In International Conference of Knowledge Based Computer Systems, pp. 46-57. National Center for Software Technology, Mumbai, India, Allied Press. Chawla, N.V., Bowyer, K.W., Hall, L.O., & Kegelmeyer, W.P. (2002). SMOTE: Synthetic Minority Over-sampling Technique. In Journal of Artificial Intelligence Research, 16 (1), 321-357. https://doi.org/10.1613/jair.953.


stschn/deepANN documentation built on June 25, 2024, 7:27 a.m.