Preview:
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
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter