skclean.simulate_noise.flip_labels_cc¶
-
skclean.simulate_noise.
flip_labels_cc
(y, lcm, random_state=None)¶ Class Conditional Noise: general version of flip_labels_uniform, a sample’s probability of getting mislabelled and it’s new (noisy) label depends on it’s true label, but not features.
- Parameters
Y (np.ndarray) – 1-D array of labels
lcm (np.ndarray) – Short for Label Confusion Matrix. lcm[i,j] denotes the probability of a sample with true label i getting mislabelled as j.
random_state (int, default=None) – Set this value for reproducibility
- Returns
Yn – 1-D array of flipped labels
- Return type
np.ndarray