Simple parameter space creation library for python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.idea
test
.gitignore
LICENSE
README.md
params.py

README.md

params

Simple parameter space creation library for python

Example

from params import ParamSpace

ps = ParamSpace()
ps.add_value("p1", True)
ps.add_list("p2", ["A", "B"])
ps.add_random("p3", 0, 1, 3)

print("param space size ", ps.grid_size)

for params in ps.param_grid():
    print(params)
    
ps.write("test.config")
param space size  6
{'p1': True, 'p2': 'A', 'p3': 0.033606735734026727}
{'p1': True, 'p2': 'A', 'p3': 0.7415990286837093}
{'p1': True, 'p2': 'A', 'p3': 0.92264224243582038}
{'p1': True, 'p2': 'B', 'p3': 0.033606735734026727}
{'p1': True, 'p2': 'B', 'p3': 0.7415990286837093}
{'p1': True, 'p2': 'B', 'p3': 0.92264224243582038}