Skip to content

Instantly share code, notes, and snippets.

@spsanderson
Created May 20, 2022 19:14
Show Gist options
  • Select an option

  • Save spsanderson/7673288f4f53289e80841553cefd6a08 to your computer and use it in GitHub Desktop.

Select an option

Save spsanderson/7673288f4f53289e80841553cefd6a08 to your computer and use it in GitHub Desktop.
Simple example with densityClust R package
install.packages("densityClust")
library(densityClust)
irisDist <- dist(iris[,1:4])
estimateDc(irisDist)
irisClust <- densityClust(irisDist, gaussian=TRUE, dc = .02767655)
plot(irisClust) # Inspect clustering attributes to define thresholds
irisClusters <- findClusters(irisClust, rho=0, delta=1)
plotMDS(irisClusters)
split(iris[,5], irisClusters$clusters)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment