% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils-evaluation.R
\name{compare_clusterings}
\alias{compare_clusterings}
\title{Compare two clusterings derived from distance matrices}
\usage{
compare_clusterings(
  D1,
  D2,
  NC = NULL,
  linkage = "ward.D2",
  labels = c("D1", "D2"),
  verbose = TRUE
)
}
\arguments{
\item{D1, D2}{Square dissimilarity matrices over the same objects.}

\item{NC}{Number of clusters (default \code{floor(sqrt(n))}).}

\item{linkage}{Linkage method. Default \code{"ward.D2"}.}

\item{labels}{Length-2 labels for the two solutions.}

\item{verbose}{Logical; print a short report.}
}
\value{
Invisibly, a list with the two label vectors, \code{ARI},
\code{NMI}, \code{pair_Jaccard} and the \code{contingency} table.
}
\description{
Clusters two dissimilarity matrices with the same linkage and number of
clusters and reports their agreement (ARI, NMI, pairwise Jaccard) and the
contingency table.
}
\examples{
set.seed(1)
D1 <- as.matrix(dist(matrix(rnorm(60), 20)))
D2 <- as.matrix(dist(matrix(rnorm(60), 20)))
compare_clusterings(D1, D2, NC = 3, verbose = FALSE)$ARI
}
