Build a frozen single-sample deployment scorer
Source:R/singlesample-deploy.R
deploy_singlesample.RdFits one rostered single-sample method and returns a frozen deployment object
that can score one incoming specimen without a scored batch, co-resident
reference cohort, or batch-correction step. This is a deployability API, not a
benchmark-ranking claim: the default "ws-balance-ilr" is a reasonable
compositional default, not a certified winner. It does not assert that any
single-sample method out-discriminates a batch-corrected pipeline; validate
the method choice on your own data.
Reticulate methods (roster tier R2; require a Python backend / venv) are intentionally not fitted by this base-R deployment wrapper.
Usage
deploy_singlesample(
X_train,
y_train,
method = "ws-balance-ilr",
meta_train = NULL,
annotation = NULL,
verify = TRUE
)Arguments
- X_train
Numeric matrix or data frame of training specimens (samples x features).
- y_train
Numeric/integer 0/1 labels aligned to
X_train.- method
Method identifier from
singlesample_method_roster.- meta_train
Optional training metadata, one row per training specimen.
- annotation
Optional feature annotation passed only to methods whose fit signature includes an
annotationargument.- verify
Logical; if
TRUE, runsinglesample_assert_row_equivarianton the training rows (or a deterministic subset for large inputs) so construction fails loudly when the fitted scorer is not single-sample deployable.