skclean.simulate_noise.UniformNoise

class skclean.simulate_noise.UniformNoise(noise_level, exact=True, random_state=None)

All labels are equally likely to be flipped, irrespective of their true label or feature. The new (noisy) label is also chosen with uniform probability from alternative class labels. Simple wrapper around flip_labels_uniform mainly for use in Pipeline.

Parameters
  • noise_level (float) – percentage of labels to flip

  • exact (bool default=True) – If True, the generated noise will be as close to noise_level as possible. The approximate version (i.e. exact=False) is faster but less accurate.

  • random_state (int, default=None) – Set this value for reproducibility

Methods

__init__(noise_level[, exact, random_state])

Initialize self.

fit_transform(X[, y])

Fit to data, then transform it.

get_params([deep])

Get parameters for this estimator.

set_params(**params)

Set the parameters of this estimator.

simulate_noise(X, y)

transform(X)