Giter VIP home page Giter VIP logo

minibatchkmeans-vs-kmeans's Introduction

MinibatchKmeans-vs-Kmeans

In this notebook, I compared two famous clustering algorithm, the minibatchkmeans and the regular kmeans on image dataset.

The data

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. Capture d’écran 2021-10-23 à 3 56 47 PM

The comparison

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. Capture d’écran 2021-10-23 à 3 59 25 PM

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. Capture d’écran 2021-10-23 à 4 01 32 PM

Finally, we compare both algorithms based on the silhouette score and investigate the performance. Capture d’écran 2021-10-23 à 4 02 54 PM

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. Capture d’écran 2021-10-23 à 4 04 33 PM

minibatchkmeans-vs-kmeans's People

Contributors

rayanaay-ops avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.