plotTSNE {densityClust}R Documentation

Plot observations using t-distributed neighbor embedding and colour by cluster


This function produces an t-SNE scatterplot based on the distance matrix of the densityCluster object (if there is only the coordinates information, a distance matrix will be calculate first), and, if clusters are defined, colours each observation according to cluster affiliation. Observations belonging to a cluster core is plotted with filled circles and observations belonging to the halo with hollow circles.


plotTSNE(x, ...)



A densityCluster object as produced by densityClust()


Additional parameters. Currently ignored

See Also

densityClust() for creating densityCluster objects, and plotMDS() for an alternative plotting approach.


irisDist <- dist(iris[,1:4])
irisClust <- densityClust(irisDist, gaussian=TRUE)
plot(irisClust) # Inspect clustering attributes to define thresholds

irisClust <- findClusters(irisClust, rho=2, delta=2)
split(iris[,5], irisClust$clusters)

[Package densityClust version 0.3.2 Index]