Fork me on GitHub

This documentation is for scikit-learn version 0.14.1Other versions

If you use the software, please consider citing scikit-learn.

sklearn.grid_search.IterGrid

class sklearn.grid_search.IterGrid(param_grid)

Generators on the combination of the various parameter lists given.

This class is DEPRECATED. It was renamed to ParameterGrid. The name IterGrid will be removed in 0.15.

Parameters:

param_grid : dict of string to sequence

The parameter grid to explore, as a dictionary mapping estimator parameters to sequences of allowed values.

Returns:

params : dict of string to any

Yields dictionaries mapping each estimator parameter to one of its allowed values.

See also

GridSearchCV
uses IterGrid to perform a full parallelized parameter search.

Examples

>>> from sklearn.grid_search import IterGrid
>>> param_grid = {'a':[1, 2], 'b':[True, False]}
>>> list(IterGrid(param_grid)) == (
...    [{'a': 1, 'b': True}, {'a': 1, 'b': False},
...     {'a': 2, 'b': True}, {'a': 2, 'b': False}])
True
__init__(param_grid)