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
Before:
After:
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 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
Tools
- micro editor
- Unix console
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
Built Distributions
File details
Details for the file genetic_optimizer-0.1.5.tar.gz
.
File metadata
- Download URL: genetic_optimizer-0.1.5.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9844e00ca4941ff19c9c1d6d11ec1266741b1e188f18a3067c71942da43d80e0 |
|
MD5 | 785b8642a622f261b6789cfef00e80b1 |
|
BLAKE2b-256 | 3127f557d16755f837d75d7dcfeb0b90e836af9d0033dde37274c0a129e53890 |
File details
Details for the file genetic_optimizer-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: genetic_optimizer-0.1.5-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87c0c3fd844833438768df75a70d48e3061fc3ff9f24f352e04b8b3ae16f55a2 |
|
MD5 | be36871d2432d3fc86150dc754134745 |
|
BLAKE2b-256 | 24af331ffeef5f9f634af1fafac67e451eb792a9bb3cc9bcb7ad361df189991e |
File details
Details for the file genetic_optimizer-0.1.5-py2-none-any.whl
.
File metadata
- Download URL: genetic_optimizer-0.1.5-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7a126032759f47422e3dcb1f164d558f3421219167aa6ea4765cbeaaf0adb0e |
|
MD5 | e2e1c9c0e173a672de9c79cfe278a99b |
|
BLAKE2b-256 | 111bea6e8c3a5a3fbbf5d7b6d91280f3aad2f90738ebd967e325959dbf2f650f |