Skip to content

ElizabethForest/metaheuristic_clustering

Repository files navigation

Metaheuristic Clustering

version status

As the name suggests, this is a repository for metaheuristic clustering algorithms, implemented in Python 3, that I could not find implemented elsewhere.

Implementations are designed to work with or without the sklearn implementation style.

Currently the algorithms implemented are:

  • Artifical Bee Colony (ABC)
    • D. Karaboga and C. Ozturk (2011). "A novel clustering approach: Artificial Bee Colony (ABC) algorithm", Applied soft computing, 11(1), 652–657, 2011.
  • Shuffled Frog Leaping Algorithm (SFLA)
    • B. Amiri, M. Fathian, and A. Maroosi (2009). "Application of shuffled frog-leaping algorithm on clustering", The International Journal of Advanced Manufacturing Technology, 45(1-2), 199-209.

Installation

metaheristic_clustering can be installed with:

pip install metaheuristic-clustering

Or you can fork this repository

Dependencies

Numpy

PyClustering

scikit-learn - only needed for interop with scikit-learn

Contributing Guidelines

Please create a pull request or an issue if you would like to contribute or have any bug reports, issues, or suggestions.

Example

There is example code using the metaheuristic-clusteing library available:

Or for a breif overview see below:

Sklearn/Object style

data = X  # your data

# SFLA Clustering
from metaheuristic_clustering.sfla import SFLAClustering

sfla_model = SFLAClustering()
sfla_labels = sfla_model.fit_predict(data)

# ABC Clustering
from metaheuristic_clustering.abc import ABCClustering

abc_model = ABCClustering()
abc_labels = abc_model.fit_predict(data)

Function style

import metaheuristic_clustering.util as util

data = X  # your data

# SFLA Clustering
import metaheuristic_clustering.sfla as sfla

best_frog = sfla.sfla(data)
sfla_labels = util.get_labels(data, best_frog)

# ABC Clustering
import metaheuristic_clustering.abc as abc

best_bee = abc.abc(data)
abc_labels = util.get_labels(data, best_bee)

Sample Results

ABC

Graphs of ABC Results

SFLA

Graphs of SLFA Results

About

Implementation of Metaheuristic clustering algorithms in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published