cluster visualization

Hi everyone,
I'm trying to visualize the results of my hdbscan analysis using the t-sne function.
I've seen the way of doing so using iris dataset:

colors = rainbow(length(unique(iris$Species)))
names(colors) = unique(iris$Species)
ecb = function(x,y){ plot(x,t='n'); text(x,labels=iris$Species, col=colors[iris$Species]) }
tsne_iris = tsne(iris[,1:4], epoch_callback = ecb, perplexity=50)

The problem is that when I try to reproduce the same results using my dataset, different points belonging to the same clusters have a different color. This is the code:

colors = rainbow(length(unique(drawings$cluster)))
names(colors) = unique(drawings$cluster)
ecb = function(x,y){ plot(x, t = 'n'); text(x, labels=drawings$cluster, col = colors[drawings$cluster])}
tsne_clustersHDB <- tsne(disegni001nw [,3:5], epoch_callback = ecb, perplexity = 5)


For example points which belong to the cluster "0" have different colors.
Could anyone help me? Thanks

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.