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
$ git clone https://github.com/jeffkinnison/pyrameter
$ cd pyrameter
$ pip install .
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.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size pyrameter-0.2.0.post3-py3-none-any.whl (39.0 kB) | File type Wheel | Python version py3 | Upload date | Hashes View |
Filename, size pyrameter-0.2.0.post3.tar.gz (24.6 kB) | File type Source | Python version None | Upload date | Hashes View |
Close
Hashes for pyrameter-0.2.0.post3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2517ae3fe15b4df2e6d58ae65a99a2c593a31a0909aae27a49be5736eb767ed7 |
|
MD5 | 390c8a6b2d6b717e969fcd6ca9d62c81 |
|
BLAKE2-256 | c698b3fb5f0303c18407f43a3fc71c9d8621d53d2e279358ebd5e126300c573a |