sampler_base

Module Contents

Classes Summary

SamplerBase

Base class for all custom samplers.

Contents

class evalml.preprocessing.data_splitters.sampler_base.SamplerBase(random_seed=0)[source]

Base class for all custom samplers.

Parameters

random_seed (int) – The seed to use for random sampling. Defaults to 0.

Methods

fit_resample

Resample the input data with this sampling strategy.

abstract fit_resample(self, X, y)[source]

Resample the input data with this sampling strategy.

Parameters
  • X (pd.DataFrame) – Training data to fit and resample.

  • y (pd.Series) – Training data targets to fit and resample.

Returns

resampled X and y data for oversampling or indices to keep for undersampling.

Return type

Tuple(pd.DataFrame, pd.Series) or list