% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simulate-weighting.R
\name{simulate_weighting_regime}
\alias{simulate_weighting_regime}
\title{Simulate data for evaluating feature-weighting schemes (variance vs CV)}
\usage{
simulate_weighting_regime(
  regime = c("cv", "variance"),
  n_samples = 120,
  n_clusters = 3,
  n_sources = 2,
  n_signal = 40,
  n_decoy = 500,
  n_noise = 60,
  effect = NULL,
  seed = NULL
)
}
\arguments{
\item{regime}{\code{"cv"} (default) or \code{"variance"}; see Details.}

\item{n_samples}{Number of objects (rows), split evenly across clusters.}

\item{n_clusters}{Number of clusters.}

\item{n_sources}{Number of data sources (independent draws of the same design).}

\item{n_signal, n_decoy, n_noise}{Numbers of discriminative, decoy
(non-discriminative but high-variance in the CV regime) and pure-noise
features per source.}

\item{effect}{Between-cluster mean shift on the signal features (defaults:
1.4 for the variance regime, 0.9 for the cv regime).}

\item{seed}{Optional RNG seed.}
}
\value{
A list with \code{List} (the sources, objects in rows), \code{truth}
(cluster labels), \code{signal_features} (indices of the discriminative
features), \code{regime} and \code{params}.
}
\description{
Generates a multi-source data set with a known cluster structure in which the
discriminative signal is carried either by high-absolute-variance features
(\code{regime = "variance"}) or by high-\emph{coefficient-of-variation}
features buried under high-abundance, high-variance decoys
(\code{regime = "cv"}). It is intended for benchmarking the \code{"var"},
\code{"cv"} and \code{"nugget"} weightings of the ABC family (and any other
feature-weighting method) on the same footing.
}
\examples{
cv  <- simulate_weighting_regime("cv", seed = 1)
# variance weighting is misled by high-abundance decoys, CV recovers the truth:
fit_var <- M_ABCpp(cv$List, numsim = 80, NC = 3, weighting = c("var", "var"))
fit_cv  <- M_ABCpp(cv$List, numsim = 80, NC = 3, weighting = c("cv",  "cv"))
c(var = cluster_agreement(mosaic_labels(fit_var, 3), cv$truth)[["ARI"]],
  cv  = cluster_agreement(mosaic_labels(fit_cv,  3), cv$truth)[["ARI"]])
}
\seealso{
\code{\link{M_ABCpp}} (the \code{weighting} argument),
\code{\link{mosaic_sim}}
}
