Evo-ML / EvoCluster

Apache License 2.0
19 stars 16 forks source link
EvoCluster-logo

An Open-Source Nature-Inspired Optimization Clustering Framework in Python

Description

EvoCluster is an open source and cross-platform framework implemented in Python which includes the most well-known and recent nature-inspired meta heuristic optimizers that are customized to perform partitional clustering tasks. The goal of this framework is to provide a user-friendly and customizable implementation of the metaheuristic based clustering algorithms which canbe utilized by experienced and non-experienced users for different applications.The framework can also be used by researchers who can benefit from the implementation of the metaheuristic optimizers for their research studies. EvoClustercan be extended by designing other optimizers, including more objective func-tions, adding other evaluation measures, and using more data sets. The current implementation of the framework includes ten metaheuristic optimizers, thirty datasets, five objective functions, twelve evaluation measures, more than twenty distance measures, and ten different ways for detecting the k value. The source code of EvoCluster is publicly available at (http://evo-ml.com/evocluster/).

Versions

Supporting links

Features

Installation

EvoCluster supports Python 3.xx.

With pip

EvoCluster can be installed using pip as follows:

pip install EvoCluster

With conda

EvoCluster can be installed using conda as follows:

conda install EvoCluster

To install from master

pip install git+https://github.com/RaneemQaddoura/EvoCluster.git#egg=EvoCluster

Get the source

Clone the Git repository from GitHub

git clone https://github.com/RaneemQaddoura/EvoCluster.git

Quick tour

To immediately use a EvoCluster. Here is how to quickly use EvoCluster to predict clusters:

from EvoCluster import EvoCluster

optimizer = ["SSA", "PSO", "GA", "GWO"] #Select optimizers from the list of available ones: "SSA","PSO","GA","BAT","FFA","GWO","WOA","MVO","MFO","CS".
objective_func = ["SSE", "TWCV"] #Select objective function from the list of available ones:"SSE","TWCV","SC","DB","DI".
dataset_list = ["iris", "aggregation"] #Select data sets from the list of available ones
num_of_runs = 3 #Select number of repetitions for each experiment. 
params = {'PopulationSize': 30, 'Iterations': 50} #Select general parameters for all optimizers (population size, number of iterations)
export_flags = {'Export_avg': True, 'Export_details': True, 'Export_details_labels': True,
                'Export_convergence': True, 'Export_boxplot': True} #Choose your preferemces of exporting files

ec = EvoCluster(
    optimizer,
    objective_func,
    dataset_list,
    num_of_runs,
    params,
    export_flags,
    auto_cluster=True,
    n_clusters='supervised',
    labels_exist=True,
    metric='euclidean'
)

ec.run() #run the framework

Now your experiment is ready to go. Enjoy!

The results will be automaticly generated in a folder which is concatnated with the date and time of the experiment. this folder consists of three csv files and two types of plots:

Datasets

The folder datasets in the repositoriy contains 30 datasets (All of them are obtained from Scikit learn, UCI, School of Computing at University of Eastern Finland, ELKI, KEEL, and Naftali Harris Blog).

To add new dataset:

Citation Request:

Please include these citations if you plan to use this Framework: