Home \ Machine Learning \ Evolutionary Data Clustering in MATLAB

Evolutionary Data Clustering in MATLAB

Clustering is an unsupervised machine learning task and many real world problems can be stated as and converted to this kind of problems. Clustering is grouping a set of  data objects is such a way that similarity of members of a group (or cluster) is maximized and on the other hand, similarity of members in two different groups, is minimized.

This problem arises in several fields, like Machine Learning, Data Mining and Statistical Data Analysis, and has enormous applications in Pattern Recognition, Image Processing, Signal Processing, Bioinformatics and Information Retrieval. For more information about Cluster Analysis, you can refer to Wikipedia article, here.

Many approaches are proposed to solve clustering problems, such as Lloyd’s k-Means Algorithm, DBSCAN, OPTICS, and Fuzzy Clustering. Each of these algorithms, has its own advantages and drawbacks.

Clustering itself can be stated as an optimization problem, thus can be solved using optimization algorithms, specially using the evolutionary algorithms and metaheuristics. Also, an extended version of clustering task, known as Automatic Clustering, can be easily solved using evolutionary methods. For automatic clustering problems, the number of clusters is not know; hence some of classic clustering approaches can not be used to accomplish this task. However, defining some good objectives, the automatic clustering can be performed by evolutionary methods, just like ordinary clustering.

In this post, we are going to share with you, a complete open-source implementation of Evolutionary Data Clustering in MATLAB. Three metaheuristics are used to perform clustering and automatic clustering tasks:

  • Real-Coded Genetic Algorithm (GA)
  • Particle Swarm Optimization (PSO)
  • Differential Evolution (DE)

The algorithms are implemented in a structured manner and if you are familiar with MATLAB programming language, you will find it easy, to use the codes in your research projects.


The download link of this project follows.

Implementation of Evolutionary Data Clustering in MATLAB


Citing This Work

If you wish, you can cite this content as follows.

Cite as:

Mostapha Kalami Heris, Evolutionary Data Clustering in MATLAB (URL: https://yarpiz.com/64/ypml101-evolutionary-clustering), Yarpiz, 2015.


  1. please could you tell me why you calculate the clustering cost?

    • Clustering is an unsupervised learning task. However, if we want to use a metaheuristic or evolutionary algorithm to perform clustering, we should state the problem as an optimization problem. Because of this, we need an objective function, which is entitled as ClusetringCost in the provided source codes.

  2. Could you tell me what is the dataset used for your experiments?

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.


Check Also

Feature Selection using Metaheuristics and EAs

Feature selection is one of common preprocessing tasks, which is performed to reduce the number ...