Advertisement
awsmpshk

Untitled

May 16th, 2022
633
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. decomp = PCA(n_components=2)
  2.  
  3. white_wines_scaled = decomp.fit_transform(X_w_test)
  4.  
  5. _, axs = plt.subplots(ncols=2, figsize=(20, 10))
  6. first_ax, second_ax = axs
  7.  
  8. first_ax.scatter(white_wines_scaled[:, 0], white_wines_scaled[:, 1], c=y_w_test, cmap='twilight_shifted')
  9. first_ax.grid(True)
  10. first_ax.set_title("Исходные значения качества для белых вин")
  11.  
  12. second_ax.scatter(white_wines_scaled[:, 0], white_wines_scaled[:, 1], c=y_w_prediction_test, cmap='twilight_shifted')
  13. second_ax.grid(True)
  14. second_ax.set_title("Предсказнные значения качества для белых вин")
Advertisement
RAW Paste Data Copied
Advertisement