from sklearn.model_selection import cross_val_score
from sklearn.model_selection import KFold
from sklearn.metrics import r2_score
crossvalidation_poly = KFold(n_splits=3, shuffle=True)
for i in range(1,11):
poly_cross_validation = PolynomialFeatures(degree=i)
X_current = poly.fit_transform(x_validation)
model = lin_regressor.fit(X_current, y_validation)
scores = cross_val_score(model, X_current,y_validation, scoring='r2', cv=crossvalidation_poly,
n_jobs=1)
I am sorry, the last question, is this correct? I am trying to run CV for the validation data