Structure, sample, and savor hyperparameter searches
Project description
pyrameter
pyrameter
is a library for designing hierarchical parameter searches with
continuous and discrete domains, and then search those spaces.
Installation
pip install pyrameter
Dependencies
numpy
scipy
scikit-learn
pymongo
dill
six
A Short Example
import math import pyrameter # Minimize the sin function def objective(params): return math.sin(params['x']) # Uniformly sample values over [0, pi] space = { 'x': pyrameter.uniform(0, math.pi), } # Set up the search with an experiment key, the domains to search, and # random search to generate values. opt = pyrameter.FMin('sin_exp', space, 'random') # Try 1000 values of x and store the result. for i in range(1000): trial = opt.generate() trial.objective = objective(trial.hyperparameters) # Print the x that minimized sin print(opt.optimum)
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
pyrameter-0.3.2.tar.gz
(31.2 kB
view hashes)
Built Distribution
pyrameter-0.3.2-py3-none-any.whl
(45.8 kB
view hashes)
Close
Hashes for pyrameter-0.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a0ea9ee4c4fad48e2218d1746eb6110718c14294a59012d7d0c31ba59d1d302 |
|
MD5 | 635af98d3d87de48b4dfbfba8b35df90 |
|
BLAKE2-256 | 8abfe0458a342ace6e9255b8eb112977cec5360aff41353c4a25b2d365267825 |