find.num.of.clusters: Finding an Optimal Number of Circular Data Clusters

View source: R/find_num_clusters.R

find.num.of.clustersR Documentation

Finding an Optimal Number of Circular Data Clusters

Description

An optimal number of clusters is selected on circular data such that the number maximizes the circular silhouette information.

Usage

find.num.of.clusters(O, Circumference, ks = 2:10)

Arguments

O

a numeric vector of coordinates of data points along a circle.

Circumference

a numeric value giving the circumference of the circle

ks

an integer vector representing possible choices for the number of clusters

Details

Using the circular clustering algorithm in the R package OptCirClust \insertCiteDebnath21OptCirClust, we will examine every value of k in the given choices of number of clusters. We select a k that maximizes the circular silhouette information.

Value

The function returns an integer number that is optimal in maximizing circular silhouette.

References

\insertAllCited

Examples

library(OptCirClust)
Circumference=100
O=c(99,0,1,2,3,15,16,17,20,50,55,53,70,72,73,69)
K_range=c(2:8)
k <- find.num.of.clusters(O, Circumference, K_range)
result_FOCC <- CirClust(O, k, Circumference, method = "FOCC")
opar <- par(mar=c(0,0,2,0))
plot(result_FOCC, cex=0.5, main="Optimal number of clusters",
     sub=paste("Optimal k =", k))
par(opar)

CircularSilhouette documentation built on April 27, 2022, 9:05 a.m.