Photo by elnaz asadi on Unsplash

Member-only story

Hands-on Tutorial

Genetic Algorithm based Clustering Algorithm in Searching Robust Initial Centroids for k-means

Optimizing robust initial centroids for k-means using genetic algorithm: a solution for local optima

10 min readMar 7, 2022

--

In the previous article, we learned together about the basic calculations of the Genetic Algorithm in a simple problem case, linear programming. We also understood the importance of initial cluster centroids in the k-means algorithm, as they directly determine the final clusters generated at the end of the process.

Today, we will delve into the application of the Genetic Algorithm in k-means clustering analysis. While the problem of obtaining robust cluster centroids is not crucial nowadays, as sklearn has produced an approach called k-means++ to ensure robustness, it can still arise if we attempt to build the k-means algorithm from scratch without any optimization. This is where the Genetic Algorithm comes into play! The Genetic Algorithm can optimize the k-means algorithm to obtain robust cluster centroids. In this article, we will demonstrate how the Genetic Algorithm can be used to approach k-means++ and the impressive results it can yield.

Are you curious? Let’s dive in and find out!

Genetic Algorithm in k-means clustering analysis

The Genetic Algorithm is an optimization technique inspired by natural evolution, consisting of selection, reproduction, and mutation operations. For a detailed explanation of the basic theory and manual calculation of the Genetic Algorithm, you can refer to the following article.

This article is compiled and written in simple language to provide a clear understanding of the Genetic Algorithm.

Implementation of Genetic Algorithm in k-means

--

--

Audhi Aprilliant

Written by Audhi Aprilliant

Data Scientist. Tech Writer. Statistics, Data Analytics, and Computer Science Enthusiast. Portfolio & social media links at http://audhiaprilliant.github.io/

Responses (1)

Write a response