User-interactive routine to find clusters

Description

Plot the f vs. delta plot, then wait for the user to select centers of clusters by left clicking the points. In general points with both large f and large delta are good candidates of cluster centroids. Selected centers are highlighted. Press ESC to end the selection.

Usage

1
FindClustersManual(distm, f, delta)

Arguments

distm

distance matrix.

f

vector of local densities f(x). Same length of the number of observations.

delta

vector of distances to the closest high ground delta(x). Same length of the number of observations.

Value

a list of the following items:

  • clusters Cluster assignments. A vector of the same length as the number of observations.

  • centers: Indices of the clustering centers.

  • silhouette: Silhouette score from the final clustering result.

  • nclust: Number of clusters.

Examples

1
2
3
4
5
6
7
8
9
data(clust3)
distm <- FindDistm(clust3, normalize = TRUE)
## Not run: 
fd <- FindFD(distm, 2, "mnorm")
ans <- FindClustersManual(distm, fd$f, fd$delta)
names(ans)
ans$centers

## End(Not run)