Use select_clust() to get a listing of available clustering algorithms:
select_clust()
.:select_clust
rtemis supports the following clustering algorithms:
Name Description
CMeans Fuzzy C-means Clustering
DBSCAN Density-based spatial clustering of applications with noise
EMC Expectation Maximization Clustering
HARDCL Hard Competitive Learning
HOPACH Hierarchical Ordered Partitioning And Collapsing Hybrid
H2OKMeans H2O K-Means Clustering
KMeans K-Means Clustering
MeanShift Mean Shift Clustering
NGAS Neural Gas Clustering
PAM Partitioning Around Medoids
PAMK Partitioning Around Medoids with k estimation
SPEC Spectral Clustering
Let’s cluster iris and we shall also use an NMF decomposition as we saw above to project to 2 dimensions.
x <- iris[, 1:4]iris_NMF <-d_NMF(x, k =2)
[90m01-07-24 00:23:40[90m [0m[0mHello, egenn[90m [d_NMF]
[0m[90m01-07-24 00:23:41[90m [0m[0m||| Input has dimensions 150 rows by 4 columns,[90m [d_NMF]
[0m[90m01-07-24 00:23:41[90m [0m[0m interpreted as 150 cases with 4 features.[90m [d_NMF]
[0m[90m01-07-24 00:23:41[90m [0m[0mRunning Non-negative Matrix Factorization...[90m [d_NMF]
[0m[90m01-07-24 00:23:41[90m [0m[0mCompleted in 0.01 minutes (Real: 0.78; User: 0.71; System: 0.03)[90m [d_NMF]
[0m
8.0.1 K-Means
iris_KMEANS <-c_KMeans(x, k =3)
[90m01-07-24 00:23:41[90m [0m[0mHello, egenn[90m [c_KMeans]
[0m[90m01-07-24 00:23:41[90m [0m[0mPerforming K-means Clustering with k = 3...[90m [c_KMeans]
[0m[90m01-07-24 00:23:41[90m [0m[0mCompleted in 1.9e-03 minutes (Real: 0.11; User: 0.09; System: 0.01)[90m [c_KMeans]
[0m
mplot3_xy(iris_NMF$projections.train[, 1], iris_NMF$projections.train[, 2],group = iris_KMEANS$clusters.train, main ="KMEANS on iris",xlab ="1st NMF component", ylab ="2nd NMF component")
8.0.2 Partitioning Around Medoids with k estimation (PAMK)
iris_pamk <-c_PAMK(x, krange =3:10)
[90m01-07-24 00:23:41[90m [0m[0mHello, egenn[90m [c_PAMK]
[0m[90m01-07-24 00:23:42[90m [0m[0mPartitioning Around Medoids...[90m [c_PAMK]
[0m[90m01-07-24 00:23:42[90m [0m[0mEstimated optimal number of clusters: 3[90m [c_PAMK]
[0m[90m01-07-24 00:23:42[90m [0m[0mCompleted in 0.01 minutes (Real: 0.49; User: 0.41; System: 0.03)[90m [c_PAMK]
[0m
mplot3_xy(iris_NMF$projections.train[, 1], iris_NMF$projections.train[, 2],group = iris_pamk$clusters.train, main ="PAM on iris",xlab ="1st NMF component", ylab ="2nd NMF component")
8.0.3 Neural Gas
iris_NGAS <-c_NGAS(x, k =3)
[90m01-07-24 00:23:42[90m [0m[0mHello, egenn[90m [c_NGAS]
[0m[90m01-07-24 00:23:42[90m [0m[0mPerforming Neural Gas clustering with k = 3...[90m [c_NGAS]
[0m[90m01-07-24 00:23:42[90m [0m[0mCompleted in 2.3e-04 minutes (Real: 0.01; User: 0.01; System: 0.00)[90m [c_NGAS]
[0m
mplot3_xy(iris_NMF$projections.train[, 1], iris_NMF$projections.train[, 2],group = iris_NGAS$clusters.train, main ="NGAS on iris",xlab ="1st NMF component", ylab ="2nd NMF component")
8.0.4 Hard Competitive Learning
iris_hardcl <-c_HARDCL(x, k =3)
[90m01-07-24 00:23:42[90m [0m[0mHello, egenn[90m [c_HARDCL]
[0m[90m01-07-24 00:23:42[90m [0m[0mRunning Hard Competitive Learning with k = 3...[90m [c_HARDCL]
[0m[90m01-07-24 00:23:42[90m [0m[0mCompleted in 1.5e-04 minutes (Real: 0.01; User: 0.01; System: 0.00)[90m [c_HARDCL]
[0m
mplot3_xy(iris_NMF$projections.train[, 1], iris_NMF$projections.train[, 2],group = iris_hardcl$clusters.train, main ="HARDCL on iris",xlab ="1st NMF component", ylab ="2nd NMF component")
8.0.5 Hierarchical Ordering and Partitioning Hybrid