Skip to content

Instantly share code, notes, and snippets.

@rkdgusrn1212
Created June 3, 2022 02:12
Show Gist options
  • Save rkdgusrn1212/d09efe513c781dfa7bea67619382dac7 to your computer and use it in GitHub Desktop.
Save rkdgusrn1212/d09efe513c781dfa7bea67619382dac7 to your computer and use it in GitHub Desktop.
Cross Validation
from sklearn.model_selection import cross_val_score
from sklearn.pipeline import Pipeline
#클수록 성능이 안좋다는 의미이므로, mae를 음수로 반환한다.
scores = cross_val_score(my_pipeline, X, y, cv=5, scoring='neg_mean_absolute_error')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment