TKmeans {TML}R Documentation

K-means clustering over the tropical projective torus

Description

This function performs k-means clustering over the tropical projective torus

Usage

TKmeans(A, C, M)

Arguments

A

matrix of points defining a tropical polytope; rows are the tropical points

C

number of clusters

M

maximum number of iterations of algorithm to find cluster centroids

Value

list with matrix of observation classified by centroid; matrix of centroid coordinates; number of iterations used

Author(s)

David Barnhill david.barnhill@nps.edu

References

David Barnhill, Ruriko Yoshida (2023). Clustering Methods Over the Tropically Convex Sets.

Examples

P <-Sim_points
C<-3
M<-10
res<-TKmeans(P,C,M)
try<-res[[1]]
cen<-res[[2]]
plot(try[,2],try[,3],col=try[,4],asp=1)
plot(try[,2],try[,3],col=try[,4],asp=1,xlab='x2',ylab='x3')
points(cen[,2],cen[,3],col=c('purple','hotpink','orange'),pch=19)

[Package TML version 1.2.0 Index]