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/).
NumPy
] (http://www.numpy.org/).SciPy
's] (https://www.scipy.org/) package.sklearn
] (https://scikit-learn.org/stable/)pandas
] (https://pandas.pydata.org/)matplotlib
] (https://matplotlib.org/)EvoCluster supports Python 3.xx.
EvoCluster can be installed using pip as follows:
pip install EvoCluster
EvoCluster can be installed using conda as follows:
conda install EvoCluster
pip install git+https://github.com/RaneemQaddoura/EvoCluster.git#egg=EvoCluster
Clone the Git repository from GitHub
git clone https://github.com/RaneemQaddoura/EvoCluster.git
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:
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:
Please include these citations if you plan to use this Framework:
Qaddoura, Raneem, Hossam Faris, Ibrahim Aljarah, and Pedro A. Castillo. "EvoCluster: An Open-Source Nature-Inspired Optimization Clustering Framework." SN Computer Science, 2(3), 1-12, 2021.
Qaddoura, Raneem, Hossam Faris, Ibrahim Aljarah, and Pedro A. Castillo. "EvoCluster: An Open-Source Nature-Inspired Optimization Clustering Framework in Python." In International Conference on the Applications of Evolutionary Computation (Part of EvoStar), pp. 20-36. Springer, Cham, 2020.
Hossam Faris, Ibrahim Aljarah, Sayedali Mirjalili, Pedro Castillo, and J.J Merelo. "EvoloPy: An Open-source Nature-inspired Optimization Framework in Python". In Proceedings of the 8th International Joint Conference on Computational Intelligence - Volume 3: ECTA,ISBN 978-989-758-201-1, pages 171-177.