Skip to content

jacobbien/protoclust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

protoclust

This R package implements hierarchical clustering with minimax linkage (a.k.a., prototype clustering). See Bien, J. and Tibshirani, R. (2011) Hierarchical Clustering with Prototypes via Minimax Linkage for more details.

Since protoclust is on CRAN, it can be easily installed using

install.packages("protoclust")

in R. Occasionally, this github version of the package will be more up-to-date. The easiest way to install this version is by using the devtools R package (if not already installed, open R and type install.packages("devtools")). To install protoclust, type

devtools::install_github("jacobbien/protoclust")

in R.

Simple example of prototype clustering

Suppose we have some data.

After computing an n-by-n matrix of dissimilarities d, we can apply prototype clustering.

# perform minimax linkage clustering:
library(protoclust)
hc <- protoclust(d)

# cut the tree at height 1:
h <- 1
cut <- protocut(hc, h = h)
# plot dendrogram (and show cut):
plot(hc, imerge = cut$imerge, col=2)
abline(h = h, lty = 2)

This gives us 9 prototypes with the guarantee that each of the n points is no more than 1 unit from one of the prototypes.

About

Hierarchical Clustering with Prototypes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published