daily pastebin goal
72%
SHARE
TWEET

Untitled

a guest Jul 11th, 2018 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top