Skip to content

Instantly share code, notes, and snippets.

@andreachello
Created October 6, 2021 04:43
Show Gist options
  • Save andreachello/687727f69220b9ef78777e340cda38bc to your computer and use it in GitHub Desktop.
Save andreachello/687727f69220b9ef78777e340cda38bc to your computer and use it in GitHub Desktop.
from sklearn.preprocessing import StandardScaler, PolynomialFeatures
from sklearn.model_selection import KFold, cross_val_predict
from sklearn.linear_model import LinearRegression, Lasso, Ridge
from sklearn.metrics import r2_score
from sklearn.pipeline import Pipeline
kf = KFold(shuffle=True, random_state=72018, n_splits=3)
X = data.drop('SalePrice', axis=1)
y = data.SalePrice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment