t_sne

Continuing the discussion from Python Script:

Hello Nedam,

I was not able to plot colors of my label(target) which have a binary values 0 and 1. I have written python script as below. Any suggestion?

tsne_data = np.vstack((X_tsne.T, label)).T #stacking data and label
df = pd.DataFrame(data = tsne_data, columns=(“Dim_1”, “Dim_2”, “Z”))
g=sn.FacetGrid(df, col=“Z”, col_wrap=2, size = 4,palette = ‘Set1’)
g=g.map(plt.scatter, ‘Dim_1’, ‘Dim_2’, s=200, alpha=0.2)
plt.title(‘Two t-SNE components’)
plt.show()

It would make things easier if you could provide a complete example and show us at what point you struggle to continue or what do you want to achieve.

My idea would be to use Python View.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.