nessie.noise

Module Contents

Functions

flipped_label_noise(labels: List[str], p: float, seed: int = RANDOM_STATE)

Applies flipped label noise to the given dataset.

uniform_label_noise(dataset, p: float)

Applies uniform noise to the given dataset.

nessie.noise.flipped_label_noise(labels: List[str], p: float, seed: int = RANDOM_STATE)

Applies flipped label noise to the given dataset.

For a dataset with C classes, a clean example with true label y is randomly flipped to one of the rest C − 1 classes with probability ρ and stays in its original label with probability 1 − ρ.

nessie.noise.uniform_label_noise(dataset, p: float)

Applies uniform noise to the given dataset.

For a dataset with C classes, a clean example with true label y is randomly corrupted to all possible classes y’ with probability ρ/C and stays in its original label with probability 1 − ρ.

Note the corrupted label might also happen to be the original label, hence the label has probability of 1 − ρ + ρ / C to stay uncorrupted.