Add to Chrome
✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Який правильний порядок команд для t-SNE plot in 2D coloured by class?
tsne = TSNE(n_components=2)
tsne_df = pd.DataFrame(data = X_tsne, columns = ['tsne comp. 1', 'tsne comp. 2'])
plt.title('t-SNE plot in 2D')
plt.figure(figsize=(8,6))
X_tsne = tsne.fit_transform(X)
plt.scatter(tsne_df.iloc[:,0], tsne_df.iloc[:,1], c=clusters, cmap="brg", s=40)
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!