diffsvg.tl.setup_model#
- diffsvg.tl.setup_model(adata, likelihood='normal', priors=None)#
Configure the per-gene GAM, given
adatapre-processed bydiffsvg.pp.bin_obs.This validates
adata/likelihoodand bundles them into aDiffSVGModelSetup- it does not build anypm.Model. Actual model construction happens lazily, per gene, oncefit_modelstarts fitting (seeDiffSVGModelSetup), so this is cheap regardless of gene count.- Parameters:
- adata
Annotated data matrix that
diffsvg.pp.bin_obswas already run on (i.e."binned" in adata.uns).- likelihood default:
'normal' Observation model. Only
"normal"(the default) is implemented.- priors default:
None Overrides for any of
DEFAULT_PRIORS, as{name: (distribution, *params)}- e.g.{"beta": ("normal", 0.0, 2.0), "sigma": ("exponential", 1.0)}. Anything not named keeps its default, so the models are unchanged unless asked. Validated here rather than inside a worker, so a typo fails immediately.
- Returns:
DiffSVGModelSetup