% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/voting.r
\name{CVAA}
\alias{CVAA}
\title{Cumulative Voting Aggregation (CVAA / W-CVAA)}
\usage{
CVAA(
  Reference = NULL,
  nrclustersR = 7,
  List,
  typeL = c("data", "dist", "clust"),
  distmeasure = c("tanimoto", "tanimoto"),
  normalize = c(FALSE, FALSE),
  method = c(NULL, NULL),
  clust = "agnes",
  linkage = c("flexible", "flexible"),
  alpha = 0.625,
  nrclusters = c(7, 7),
  gap = FALSE,
  maxK = 15,
  votingMethod = c("CVAA", "W-CVAA"),
  optimalk = nrclustersR
)
}
\arguments{
\item{Reference}{A reference partition (a clustering result, optionally an
object produced by a weighted/CEC method). Required.}

\item{nrclustersR}{The number of clusters of the reference partition. Default is 7.}

\item{List}{A list of data matrices. It is assumed the rows correspond with the objects.}

\item{typeL}{Indicates whether the provided matrices in "List" are either data
matrices ("data"), distance matrices ("dist") or clustering results ("clust").}

\item{distmeasure}{A vector of the distance measures to be used on each data matrix. Should be one of "tanimoto", "euclidean", "jaccard", "hamming". Defaults to c("tanimoto","tanimoto").}

\item{normalize}{Logical. Indicates whether to normalize the distance matrices or not, defaults to c(FALSE, FALSE).}

\item{method}{A method of normalization. Should be one of "Quantile","Fisher-Yates", "standardize","Range" or any of the first letters of these names. Default is c(NULL,NULL).}

\item{clust}{Choice of clustering function (character). Defaults to "agnes".}

\item{linkage}{Choice of inter group dissimilarity (character) for each data set. Defaults to c("flexible","flexible").}

\item{alpha}{The parameter alpha to be used in the "flexible" linkage of the agnes function. Defaults to 0.625.}

\item{nrclusters}{The number of clusters to divide each individual dendrogram in. Default is c(7,7).}

\item{gap}{Logical. Whether the optimal number of clusters should be determined with the gap statistic. Defaults to FALSE.}

\item{maxK}{The maximal number of clusters to investigate in the gap statistic. Default is 15.}

\item{votingMethod}{The method to be performed: "CVAA" or "W-CVAA".}

\item{optimalk}{An estimate of the final optimal number of clusters. Defaults to nrclustersR.}
}
\value{
A list of two elements:
\item{DistM}{A NULL object}
\item{Clust}{The resulting clustering (order, order.lab and Clusters)}
The value has class 'Ensemble'.
}
\description{
\code{CVAA} performs cumulative voting consensus clustering. A
reference partition is used to align the individual source partitions, which
are then aggregated into a consensus stochastic membership matrix. Two
variants are available: cumulative voting (\code{"CVAA"}) and the
information-weighted variant (\code{"W-CVAA"}).
}
\details{
Cumulative voting aggregation aligns each source membership matrix to
a running consensus by least-squares voting, then averages cumulatively. The
weighted variant orders the partitions by average information content and
weights their contribution accordingly. When \code{optimalk} is smaller than
\code{nrclustersR} the JS-ALink agglomeration is used to merge reference
clusters.
}
\examples{
\dontrun{
data(mosaic_toy)
L <- mosaic_toy$List
Ref <- Cluster(L[[1]], type = "data", distmeasure = "euclidean")
attr(Ref, "method") <- "Single"
res <- CVAA(Reference = Ref, nrclustersR = 5, List = L, typeL = "data",
  distmeasure = c("euclidean","euclidean"), votingMethod = "CVAA", optimalk = 5)
}
}
\references{
Ayad H.G. and Kamel M.S. (2008). Cumulative voting consensus
method for partitions with variable number of clusters. IEEE Transactions on
Pattern Analysis and Machine Intelligence, 30(1), 160-173.
}
