1

I used TSNE method to cluster my DataSet.

X_embedded = TSNE(n_components=2, verbose=1, perplexity=10, n_iter=600).fit_transform(binary)
kmeans = KMeans(init="k-means++", n_clusters=6, n_init=4)
kmeans.fit(X_embedded) 
  1. Why it just clusters my DataSet into 2 clusters?
  2. What is The best method for clustering that?
  3. How to determine Number Of Clusters ?

Here is my clusters's dispersion :

import seaborn as sns

sns.scatterplot(data = X_embedded)

Clustered DataSet

  • Welcome to CV.SE. 1. I think you have a little programming mistake in your plotting. There are a few methodologies that might be relevant to your questions. Please see my answer below for more details.
  • – usεr11852 Jul 01 '21 at 09:25
  • @usεr11852 Thanks..Yes It has some problems...I used import plotly.express as px. And draw scatterPlot with that...And alsodata["x_component"]=X_embedded[:,0] data["y_component"]=X_embedded[:,1]...Is It true? – a.programmer Jul 01 '21 at 14:50
  • Yes, but please note that the order of components in t-SNE is arbitrary. (i.e. x_component do not have to be the first column of the transformed output) – usεr11852 Jul 01 '21 at 23:37