Skip to main content

Genetic algorithm optimizer using K-Means clustering with one way ANOVA algorithms.

Project description

Genetic Optimizer

Genetic algorithm optimizer using K-Means clustering with one way ANOVA algorithms

Build Status PyPI version

Before:

github-small

After:

github-small

Installation:

Use the package manager pip to install genetic_optimizer.

pip3 install genetic-optimizer

Note:

Package require =>Python 3.6.5, using genetic_optimizer in Python 2.x.x projects may not work correctly. If you are not sure about your python version, try:

python3 --version

Usage

import genetic_optimizer

some_object = genetic_optimizer.Optimizer()
some_object.generate(population_size=46, chromosome_size=8, equal_chromosomes=True, initialization_method='Random', representation='Binary', saving_method='csv')

These are default options for generator, you can change them in DEFAULTS.ini file in package directory

some_object.optimize(data=None, iterations=12, shuffle_scale=0.6, variety=0.8, chromosome_weight=0.0000001)

These are default options for optimizer, you can change them in STANDARDS.conf file in package directory

Note

  • If optimizer got stuck at the beginning, that usually means that your dataframe with population is to small to find appropiate parents in order to create next generations.

  • For more description, please check out project wiki.

Pros

  • There is no mutation and crossover probability. Program matches parents according to group differences and create new child, built from the most successful pairs of genes from them. That means new generations are closer to each one and every child is not worse that genetic worse parent.

  • You can play off with options to achive more precised results.

Cons

  • Fitness and parent selection process takes place recursively. If you are not using some RDD computing, program execution may be longer.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

Tools

Code is mostly written in accordance with Google PEP style guide

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

genetic_optimizer-0.1.7.tar.gz (13.1 kB view details)

Uploaded Source

Built Distributions

genetic_optimizer-0.1.7-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

genetic_optimizer-0.1.7-py2-none-any.whl (18.7 kB view details)

Uploaded Python 2

File details

Details for the file genetic_optimizer-0.1.7.tar.gz.

File metadata

  • Download URL: genetic_optimizer-0.1.7.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7

File hashes

Hashes for genetic_optimizer-0.1.7.tar.gz
Algorithm Hash digest
SHA256 d9de79003b99d47c6c7f31d67761b6d7cc0d21f60f7afe2f7d5100192d38674a
MD5 9dbf31f95fd5e63d921ec9d36f8e5193
BLAKE2b-256 f11c55725929d13577150fc6d9f6069d5d24b4433db273ea5b40c6272b589d22

See more details on using hashes here.

File details

Details for the file genetic_optimizer-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: genetic_optimizer-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 18.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7

File hashes

Hashes for genetic_optimizer-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 fe7588b853c04f058a146b936de6ebde7f4173fa3bc84d7c6719cb347faf3672
MD5 6e83e89cfddfbb23f2fac3de2bf1fc35
BLAKE2b-256 f48ab621611c03bee2b298194e0ebb2da2872f77479eda6ec5017b9e22f03280

See more details on using hashes here.

File details

Details for the file genetic_optimizer-0.1.7-py2-none-any.whl.

File metadata

  • Download URL: genetic_optimizer-0.1.7-py2-none-any.whl
  • Upload date:
  • Size: 18.7 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7

File hashes

Hashes for genetic_optimizer-0.1.7-py2-none-any.whl
Algorithm Hash digest
SHA256 d1e566b99077a0858e643d2c73a9f1ab1714635a09ebae2e304b6ac24c8486ad
MD5 ed403e52d283713bf7834bcef8a64ac1
BLAKE2b-256 af981878577b9412488bae021bfadb23ccef313b5a88aee4e58ae28e6ab1d1be

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page