from yellowbrick.datasets import load_bikeshare
from sklearn.linear_model import Ridge
from yellowbrick.regressor import PredictionError
from sklearn.model_selection import train_test_split

X, y = load_bikeshare()

# Create training and test sets
X_train, X_test, y_train, y_test = train_test_split(
    X, y, test_size=0.1
)

visualizer = PredictionError(Ridge(alpha=3.181))
visualizer.fit(X_train, y_train)
visualizer.score(X_test, y_test)
visualizer.show()