sampler-class: Base Sampler class

SamplerR Documentation

Base Sampler class

Description

This is an abstract class for sampling datasets.

Public fields

label

('character()')

mode

('character()')

Methods

Public methods


Method new()

Creates a new instance of this R6 class.

Usage
Sampler$new(label = NA_character_, mode = c("auto"))
Arguments
label

The label for the sampler object.

mode

Currently unused member.

Note that this object is typically constructed by a derived class.


Method fit()

Check inputs and statistics of the sampler. Normally, you should use fit_resample in all cases.

Usage
Sampler$fit(X, y)
Arguments
X

Feature dataset, usually a data.frame or an array.

y

Target dataset, usually a column of a data.frame or an array.

Returns

A list with X_resampled and y_resampled.

Note that this object is typically constructed by a derived class.


Method fit_resample()

Resample the dataset.

Usage
Sampler$fit_resample(X, y)
Arguments
X

Feature data set, usually a data.frame or an array.

y

Target data set, usually a column of a data.frame or an array.

Returns

A list with X_resampled and y_resampled.

Note that this object is typically constructed by a derived class.


Method clone()

The objects of this class are cloneable with this method.

Usage
Sampler$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


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