% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/M_ABCdist.R
\name{M_ABCdist}
\alias{M_ABCdist}
\title{Multi-source M-ABC with distance accumulation}
\usage{
M_ABCdist(
  List,
  source_weights = NULL,
  distmeasure = rep("euclidean", length(List)),
  weighting = rep("var", length(List)),
  normalize = rep(list(NULL), length(List)),
  gr = c(),
  bag = rep(TRUE, length(List)),
  numsim = 1000L,
  numvar = rep(100L, length(List)),
  linkage = rep("ward.D", length(List)),
  NC = NULL,
  NC2 = NULL,
  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{source_weights}{Optional non-negative source weights (normalised to sum
to one); \code{NULL} = equal weights.}

\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{NC2}{Optional number of clusters to cut the final tree into.}

\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_ABCdist"} with \code{source_D}, \code{DistM},
\code{weights} and \code{Clust}.
}
\description{
Runs \code{\link{ABCdist.SingleInMultiple}} on each source to obtain a
\code{[0, 1]} dissimilarity, combines them as a weighted mean
\eqn{D = \sum_k w_k D_k} and applies a final agglomerative clustering.
}
\examples{
data(mosaic_toy)
fit <- M_ABCdist(mosaic_toy$List, numsim = 40, weighting = c("var", "nugget"))
dim(fit$DistM)
}
\references{
\insertCite{Amaratunga2008}{MosaiClusteR}
}
\seealso{
\code{\link{M_ABCpp}}, \code{\link{ABCdist.SingleInMultiple}},
\code{\link{M_ABCdist.WC}}
}
