Session Ready
Exercise

Training a model with PCA

Now that we have run PCA on the wine dataset, let's try training a model with it.

Instructions
100 XP
  • Split the transformed_X vector and the y labels set into training and test sets using train_test_split.
  • Fit the knn model using the fit() function on the X_wine_train and y_wine_train sets.
  • Print out the score using knn's score() function on X_wine_test and y_wine_test.