Multi class Imbalanced datasets under-sampling imblearn
If you're looking for a fast workaround to solve this you have to increase n_neighbors parameter in AllKNN, but I wouldn't recommend using this type of undersampling algorithm for what you want to do!



Explanation:

AllKN is an under-sampling technique based on Edited Nearest Neighbors. These techniques try to under-sample your majority classes by removing samples that are close to the minority class, in order to make your classes more separable. The way they work is that they remove samples from the majority class that have at least 1 nearest neighbor in the minority class. The thing is that if the classes are separable enough and the majority samples have no minority nearest neighbors, they can't be removed!

If you want a technique that undersamples your data in order to get exactly the same number of samples from the minority and the majority class, I'd recommend using a different technique (e.g. ClusterCentroids, which you've used is such). ENN-based undersampling techniqes aren't built for that. You can also read this tutorial which compares different resampling algorithms imblearn.

As a final remark, if possible, I'd recommend oversampling...