evalml.pipelines.components.Undersampler

class evalml.pipelines.components.Undersampler(sampling_ratio=0.25, sampling_ratio_dict=None, min_samples=100, min_percentage=0.1, random_seed=0, **kwargs)[source]

Random undersampler component. This component is only run during training and not during predict.

name = 'Undersampler'
model_family = 'none'
hyperparameter_ranges = {}
default_parameters = {'min_percentage': 0.1, 'min_samples': 100, 'sampling_ratio': 0.25, 'sampling_ratio_dict': None}

Instance attributes

needs_fitting

parameters

Returns the parameters which were used to initialize the component

Methods:

__init__

Initializes an undersampling transformer to downsample the majority classes in the dataset.

clone

Constructs a new component with the same parameters and random state.

describe

Describe a component and its parameters

fit

Resample the data using the sampler.

fit_transform

Fit and transform the data using the undersampler.

load

Loads component at file path

save

Saves component at file path

transform

No transformation needs to be done here.

Class Inheritance

Inheritance diagram of Undersampler