Guest User

Untitled

a guest
Jul 11th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. steps = [
  2. ('scalar', StandardScaler()),
  3. ('poly', PolynomialFeatures(degree=2)),
  4. ('model', Ridge(alpha=10, fit_intercept=True))
  5. ]
  6.  
  7. ridge_pipe = Pipeline(steps)
  8. ridge_pipe.fit(X_train, y_train)
  9.  
  10. print('Training Score: {}'.format(ridge_pipe.score(X_train, y_train)))
  11. print('Test Score: {}'.format(ridge_pipe.score(X_test, y_test)))
Add Comment
Please, Sign In to add comment