Hyperparameter optimization based on a genetic algorithm.
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.0.tar.gz
(4.0 kB
view details)
File details
Details for the file geneticpy-0.1.0.tar.gz
.
File metadata
- Download URL: geneticpy-0.1.0.tar.gz
- Upload date:
- Size: 4.0 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 | 06e98e607250fd6e8473ed280a2ffff576886223fc80b2652c69c4aec881d8fd |
|
MD5 | bd023d9b2fa4c55b62178e79a40c2efe |
|
BLAKE2b-256 | d604768f9438724365e33940a3118507faa97a91a7ac317dd26704ecaa786572 |