Git Product home page Git Product logo

evonp's Introduction

Evolutionary Algorithm with Nearest Point (EvoNP)

An efficient evolutionary algorithm with Nearest Point is a clustering algorithm which aims at grouping similar data points to the same cluster and dissimilar data points to different clusters. It is based on the evolution behavior of genetic algorithm and the Nearest Neighbor Search (NNS) technique. The algorithm starts by reading the data set and generating the initial population. The initial population is then passed to the Nearest Point (NP) clustering technique where the Election, Selection, and Assignment operators generating an updated population which is then evaluated using a specific fitness function. The population is then passed to the evolutionary operators where the selection, crossover, mutation, and elitism operators are performed generating an evolved population. The evolved population is then considered as a new population for the next round of evolving using the NP clustering technique and evolutionary operators until a predefined number of generations is reached. The best chromosome from the last generation is considered as the final best solution.

Requirements

  • sklearn
  • NumPy
  • SciPy
  • Matplotlib
  • Pandas
  • treelib

Setup virtual enviroment

If you would like to work in an isolated environment which is strongly recommended so that you can work on different projects without having conflicting library versions, install virtualenv by running the following pip command.

python3 -m pip install --user -U virtualenv

Then create your isolated Python environment by typing this

virtualenv your_env

Now, everytime you want to active this enviroment, just type the following

source your_env/bin/active

Installation

  • Python 3.xx is required.

Run

pip3 install -r requirements.txt

(possibly with sudo)

That command above will install sklearn, NumPy, SciPy, Matplotlib, Pandas, and treelib for you.

  • If you are installing EvoNP algorithm onto Windows, please Install Anaconda from here https://www.continuum.io/downloads, which is the leading open data science platform powered by Python.

Get the source

Clone the Git repository from GitHub

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

Quick User Guide

EvoNP contains the main file is the EvoNP.py, which represents the implementation of the algorithm. The test0.py is an example file for using the EvoNP algorithm as an interface to the algorithm. In the test0.py you can setup your experiment by selecting the datasets, number of chromosomes, number of generations, crossover probability, mutation probability, and number of runs.

The following is a sample example to use the EvoNP algorithm.

Change dataset names, number of chromosomes, number of generations, crossover probability, mutation probability, and number of runs variables as you want:

dataset_List = ["VaryDensity.csv","flame.csv"]
nChromosomes = 20
nGenerations = 50
crossoverProbability = 0.8
mutationProbability = 0.001
runs = 30

Now your experiment is ready to run. Enjoy!

EvoNP description page

http://evo-ml.com/evonp/

Published Article

https://link.springer.com/article/10.1007/s12652-020-02570-2

Demo video

Citing EvoNP

Qaddoura, R., Faris, H. & Aljarah, I. An efficient evolutionary algorithm with a nearest neighbor search technique for clustering analysis. J Ambient Intell Human Comput (2020). https://doi.org/10.1007/s12652-020-02570-2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.