Skip to contents

A thin wrapper around native FLASH priors. Activity and effect priors are declared in semantic sample/feature order, then mapped to native axes once. Observations may be negative. No centering or sign flipping is performed.

Usage

fit_seminonnegative_ebmf(
  X,
  sample_side,
  activity_prior = ebnm::ebnm_point_exponential,
  effect_prior = ebnm::ebnm_point_laplace,
  initialization = "native_greedy",
  ...
)

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.

activity_prior

Recognized nonnegative native EBNM prior.

effect_prior

Signed native EBNM prior, or a custom function whose support remains unknown and whose stability refits require a callback.

initialization

Only native_greedy is supported.

...

Other fit_ebmf arguments, excluding ebnm_fn.

Value

A native flash fit with nonnegative activity and declared effect support.

Details

Origin: WRAPPER / call_only. No upstream implementation source copied. Use factor_provenance("fit_seminonnegative_ebmf") for source pins and authors.

Author

Mikhael Manurung. Native FLASH: Jason Willwerscheid, Peter Carbonetto, Wei Wang and Matthew Stephens; native EBNM authors are listed in credits.

Examples

if (FALSE) {
set.seed(3)
A <- matrix(rexp(24), 12, 2)
B <- matrix(rnorm(16), 8, 2)
X <- tcrossprod(A, B) + matrix(rnorm(96, sd = .2), 12, 8)
dimnames(X) <- list(paste0("s", 1:12), paste0("g", 1:8))
fit <- fit_seminonnegative_ebmf(X, "rows",
  max_factors = 2,
  backfit = TRUE, seed = 4, verbose = 0, feature_scale = "simulated_intensity"
)
factor_activity(fit)
}