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 = geneticpy.optimize(loss_function, param_space, size=200, generation_count=500, verbose=False)
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-0.1.1.tar.gz
(4.3 kB
view details)
Built Distribution
File details
Details for the file geneticpy-0.1.1.tar.gz
.
File metadata
- Download URL: geneticpy-0.1.1.tar.gz
- Upload date:
- Size: 4.3 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 | 38c78a31d756810ae426eabd2ce31f09533ea0148b2473eed7f19caed832a195 |
|
MD5 | 2817cfae696b53fd7076d4507269ddb5 |
|
BLAKE2b-256 | dfafdd1bf6378bae10b0b3069918f4848aad3a46fe33ea95dfe1a961c341e5fe |
File details
Details for the file geneticpy-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: geneticpy-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.4 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 | 8c5f0b45f9ea0bc69040337ee1a4f3df81ed223b84b7433685a1e1d9cf800bbf |
|
MD5 | 06ca89420f6ead23888e738b1825e4ba |
|
BLAKE2b-256 | 55cd627873da247408d5923654aa9b584e7fbdcb73015b7bf6bedae6d1686baf |