GeneticPy is an optimizer that uses a genetic algorithm to quickly search through custom parameter spaces for optimal solutions.
Project description
GeneticPy
GeneticPy is an optimizer that uses a genetic algorithm to quickly search through custom parameter spaces for optimal solutions.
Installation
GeneticPy requires Python 3.4+
pip install geneticpy
Example Usage:
A brief example to get you started is included below:
def loss_function(params):
if params['type'] == 'add':
return params['x'] + params['y']
elif params['type'] == 'multiply':
return params['x'] * params['y']
param_space = {'type': geneticpy.ChoiceDistribution(choice_list=['add', 'multiply']),
'x': geneticpy.UniformDistribution(low=5, high=10, q=1),
'y': geneticpy.GaussianDistribution(mean=0, standard_deviation=1)}
best_params, loss, total_time = geneticpy.optimize(loss_function, param_space, size=200, generation_count=500, verbose=True)
PyPi Project
https://pypi-hypernode.com/project/geneticpy/
Contact
Please feel free to email me at brandonschabell@gmail.com with any questions or feedback.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
geneticpy-1.0.0.tar.gz
(4.6 kB
view details)
Built Distribution
File details
Details for the file geneticpy-1.0.0.tar.gz
.
File metadata
- Download URL: geneticpy-1.0.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6007e90339fc5a2859e706375b2cbd401a6d1a957bc66d2a289f20019653a6c |
|
MD5 | 67c95e9bf4db00acc48e9dad0ddd21b4 |
|
BLAKE2b-256 | a7c7c0fcfcb1aaa4e0f08f570e76853e8471e734f48bcf1a28534f77e4f96551 |
File details
Details for the file geneticpy-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: geneticpy-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ae24ce4983c4bd8c9124609f986781ee30802ee195327ea6c4a955461394414 |
|
MD5 | 019d789133efdfdd7a54f164306f49bf |
|
BLAKE2b-256 | f50fee0d34b0069954f554befecb0c8bd94e422c708d173aa2dd05a0284e8b96 |