import numpy as np from sklearn.model_selection import GridSearchCV # logspace creates numbers that are evenly spaces in log-space # it uses a base of 10 by default, here starting from 10^-4 to 10^1, with 6 steps in total param_grid = {'alpha': np.logspace(-4, 1, 6)} param_grid