Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
content badge
swh:1:cnt:26037d33e22bedb33ac0b2fb7289129c1ab81362

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
(requires biblatex-software package)
Generating citation ...
\name{cluster_performance}
\alias{cluster_performance}
\title{External Cluster Validity Metrics}
\description{
  Computes four popular external cluster validity metrics (adjusted Rand index, purity, V-measure and Normalised Mutual Information) through comparison of cluster assignments and true class labels. 
}
\usage{
cluster_performance(assigned, labels, beta)
}
\arguments{
  \item{assigned}{a vector of cluster assignments made by a clustering algorithm.}
  \item{labels}{a vector of true class labels to be compared with assigned.}
  \item{beta}{(optional) positive numeric, used in the computation of V-measure. larger values apply higher weight to homogeneity over completeness measures. if omitted then beta = 1 (equal weight applied to both measures).}
}
\value{
  a vector containing the four evaluation metrics listed in the description.
}
\references{
Zhao Y., Karypis G. (2004) Empirical and Theoretical Comparisons of Selected Criterion
Functions for Document Clustering. \emph{Machine Learning}, \bold{55}(3), 311--331.

Strehl A., Ghosh J. (2002) Cluster ensembles—a knowledge reuse framework for combining
multiple partitions. \emph{Journal of Machine Learning Research}, \bold{3}, 583--617.

Rosenberg A., Hirschberg J. (2007) V-Measure: A Conditional Entropy-Based External
Cluster Evaluation Measure. \emph{EMNLP-CoNLL}, \bold{7}, 410--420. Citeseer.

Hubert, L., Arabie, P. (1985) Comparing Partitions. \emph{Journal of Classification}, \bold{2}(1), 193--218.
}
\examples{
## load dermatology dataset
data(dermatology)

## obtain clustering solution using MCDC
sol <- mcdc(dermatology$x, 6)

## evaluate solution using external cluster validity measures
cluster_performance(sol$cluster, dermatology$c)
}
\keyword{file}

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API