% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/M_ABCpp.R
\name{M_ABCpp}
\alias{M_ABCpp}
\title{Multi-source Aggregating Bundles of Clusters (M-ABC), C++-accelerated}
\usage{
M_ABCpp(
  List,
  distmeasure = rep("euclidean", length(List)),
  weighting = rep("var", length(List)),
  normalize = rep(FALSE, length(List)),
  gr = c(),
  bag = rep(TRUE, length(List)),
  numsim = 1000,
  numvar = rep(100, length(List)),
  linkage = rep("ward.D2", length(List)),
  NC = NULL,
  dissimilarity = "mabc",
  final_linkage = "ward",
  alpha = 0.625,
  mds = FALSE,
  nfeat = NULL,
  nugget_type = "between",
  nugget_args = list()
)
}
\arguments{
\item{List}{A list of \eqn{K} data matrices over the same objects,
\strong{objects (samples) in rows} and features in columns.}

\item{distmeasure, weighting, normalize, bag, numvar, linkage}{Per-source vectors
(recycled to \eqn{K}) forwarded to \code{\link{ABCpp.SingleInMultiple}}.}

\item{gr}{Unused; kept for compatibility.}

\item{numsim}{Iterations per source.}

\item{NC}{Base-cluster count per source (\code{NULL} = data-driven).}

\item{dissimilarity}{Consensus dissimilarity, \code{"mabc"} or \code{"abc"}.}

\item{final_linkage, alpha}{Final clustering controls.}

\item{mds}{Logical; MDS of the consensus dissimilarities.}

\item{nfeat}{Feature-subsample size forwarded to
\code{\link{ABCpp.SingleInMultiple}} (\code{NULL} = \eqn{\lfloor\sqrt{G}\rfloor}).}

\item{nugget_type, nugget_args}{Forwarded to the nugget weighting.}
}
\value{
A list of class \code{"M_ABC"} with \code{DistM} and \code{Clust}.
}
\description{
Extends the single-source ABC algorithm of
\insertCite{Amaratunga2008}{MosaiClusteR} to \eqn{K \ge 2} sources: runs
\code{\link{ABCpp.SingleInMultiple}} per source, row-stacks the per-iteration
label matrices, and builds a single consensus dissimilarity via
\code{\link{f.clustABC.MultiSource}} (C++ kernel when available).
}
\section{Data-nugget weighting}{

Set \code{weighting = "nugget"} (per source, recycled) to weight features by
the data-nugget between-group variance instead of the classic variance; see
\code{\link{ABCpp.SingleInMultiple}} and \code{\link{create_data_nuggets}}.
}

\examples{
data(mosaic_toy)
fit <- M_ABCpp(mosaic_toy$List, numsim = 50, NC = 3,
               weighting = c("var", "nugget"))
table(stats::cutree(stats::as.hclust(fit$Clust), 3))
}
\references{
\insertAllCited{}
}
\seealso{
\code{\link{ABCpp.SingleInMultiple}}, \code{\link{f.clustABC.MultiSource}},
\code{\link{create_data_nuggets}}
}
