.
size. from imblearn.under_sampling import ClusterCentroids # Define the undersampler cc = ClusterCentroids(sampling_strategy='majority') # Undersample the data X_resampled, y_resampled = cc.fit_resample(X, y) E. Edited Nearest Neighbors: This method removes majority class samples that are closer to