Elegant grid search in python/numpy

You can use the ParameterGrid from the sklearn module

http://scikit-learn.org/stable/modules/generated/sklearn.grid_search.ParameterGrid.html

Example

from sklearn.grid_search import ParameterGrid
param_grid = {'param1': [value1, value2, value3], 'paramN' : [value1, value2, valueM]}

grid = ParameterGrid(param_grid)

for params in grid:
    your_function(params['param1'], params['param2'])

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)