In this notebook, I compared two famous clustering algorithm, the minibatchkmeans and the regular kmeans on image dataset.
First of all, we need to download the image data used in this comparison.
For the smal dataset: https://drive.google.com/drive/folders/1YHGUbFLp_5HiRISBzRo3GmnM4OQpAO0T?usp=sharing
For the big dataset: https://drive.google.com/drive/folders/1YHGUbFLp_5HiRISBzRo3GmnM4OQpAO0T?usp=sharing
The data is constitued of 4 types of white cells.
Because minibatch-kmeans aims to reduce memory constraint and decrease the cpu time, we'll compare both of the clustering algorithms on time execution. We'll also investigate the effect of minibatch-kmans parameters such as batch size and eventually the number of clusters.
Because silhouette score weren't good, we wanted to visualize the data in a factorial plane using Linear Discriminative Analysis. Because we had the label of each class, we applied the discriminative algorithm to have less dimension to deal with, and to investigate the impact of the input space on both Kmeans and MiniBatchKmeans.
Finally, we compare both algorithms based on the silhouette score and investigate the performance.
We ended up with approximately the same results, and we can say with confidence, that minibatch-kmeans is appropriate for both small and big dataset, especially with images, where It performs > 50 times faster than Kmeans.