'Iterate over the points in the grid.
Returns
params : iterator over dict of string to any
Yields dictionaries mapping each estimator parameter to one of its
allowed values.'

def __iter__(self):

    for p in self.param_grid:
        items = sorted(p.items())
        if (not items):
            (yield {})
        else:
            (keys, values) = zip(*items)
            for v in product(*values):
                params = dict(zip(keys, v))
                (yield params)
