Each candidate uses a distinct native initializer seed. Native-random starts preserve audited prior sign constraints. softImpute and IRLBA starts require signed priors on both native sides; IRLBA also requires dense complete input. Candidate failures are retained. ELBO ranks optimization solutions under the fitted model and does not measure biological interpretability or uncertainty.
Usage
fit_multistart_ebmf(
X,
sample_side,
ebnm_fn = ebnm::ebnm_point_normal,
S = NULL,
var_type = 0L,
max_factors = 50L,
backfit = FALSE,
nullcheck = TRUE,
id_policy = "require",
feature_scale = "unknown",
independent_unit = NULL,
n_starts = 10L,
init_method = c("native_random", "softImpute", "irlba"),
init_seeds = NULL,
seed = NULL,
select = c("elbo", "none"),
keep_fits = TRUE,
verbose = 1L,
control = list()
)Arguments
- X
Named numeric matrix or double sparse Matrix; NA is observed missingness. Only dimnames are kept; other attributes are dropped.
- sample_side
"rows"or"columns": which side holds samples. Required.- ebnm_fn
Prior family: one
ebnm::ebnm_*function for both sides, or a list of two in native row/column order (not sample/feature order). Defaultebnm::ebnm_point_normal. Useebnm_point_exponentialfor nonnegative sides.- S
Optional known observation standard errors (scalar, vector or matrix).
NULL(default) estimates noise from the data.- var_type
Residual variance structure passed to flashier:
0L(default) one constant,1Lper row,2Lper column,c(1L, 2L)both (in that order),NULLnone, which requiresS. With one constant variance (0L), features measured on larger scales dominate the fit, so use2Lor rescale the features first. No centering is assumed; an intercept is available throughintercept.- max_factors
Positive bound on each candidate's greedy rank.
- backfit
Run the native backfit after greedy addition (default
FALSE).- nullcheck
Drop factors that do not improve the objective (default
TRUE).- id_policy
"require"(default) stops on missing dimnames;"generate"creates them.- feature_scale
Free-text label for what the matrix values measure, e.g.
"log1p_normalized_counts". Default"unknown". Recorded, never applied.- independent_unit
Optional free-text description of the biological replicate, e.g.
"donor"; recorded, not inferred.- n_starts
Integer number of candidates, at least two.
- init_method
native_random, softImpute or irlba.
- init_seeds
Optional unique nonnegative integer initializer seeds, one per candidate. Supply these or a master seed.
- seed
Optional scoped master seed used to generate initializer seeds.
- select
elbo chooses the largest finite native ELBO; exact ties choose the smallest start ID. none leaves best_fit and selected_start unset.
- keep_fits
Retain all successful native candidates; the selected best_fit is available even when FALSE.
- verbose
Native flashier verbosity;
0is silent.- control
Native pipeline settings; greedy init_fn is owned by this wrapper.
Value
A multistart_result with best_fit, selected_start, candidates, optional fits and analysis_metadata. All-fail errors retain their candidates table. Candidate digests identify numerical coordinates and exclude elapsed time and time-based fit IDs. Initializer traces include native validation probes. Stability refits require an explicit callback for the full selection recipe.
Author
Mikhael Manurung; native FLASH authors Jason Willwerscheid, Peter Carbonetto, Wei Wang and Matthew Stephens. No native source is copied. Optional initializers: Trevor Hastie, Rahul Mazumder and Balasubramanian Narasimhan (softImpute); Jim Baglama, Lothar Reichel and B. W. Lewis (irlba).