Machine Learning, Technology, Data Analysis, Python, Data Science.
plt.xlabel('Component 1 (PCA)') plt.ylabel('Component 2 (PCA)') plt.title('PCA') plt.subplot(1, 2, 2) plt.scatter(X_tsne[:, 0], X_tsne[:, 1], c=y, cmap='viridis') plt.xlabel('Component 1 (t-SNE)') plt.ylabel('Component 2 (t-SNE)') plt.title('t-SNE') plt.tight_layout() plt.show() Output: In this