evalml.pipelines.components.SMOTENSampler.__init__

SMOTENSampler.__init__(sampling_ratio=0.25, k_neighbors=5, n_jobs=- 1, random_seed=0, **kwargs)[source]

Initializes the oversampler component.

Parameters
  • sampling_ratio (float) – This is the goal ratio of the minority to majority class, with range (0, 1]. A value of 0.25 means we want a 1:4 ratio of the minority to majority class after oversampling. We will create the a sampling dictionary using this ratio, with the keys corresponding to the class and the values responding to the number of samples. Defaults to 0.25.

  • k_neighbors (int) – The number of nearest neighbors to used to construct synthetic samples. Defaults to 5.

  • n_jobs (int) – The number of CPU cores to use. Defaults to -1.