Score the structurally-informed ILR single-sample scorer (ss-struct-ilr)
Source:R/singlesample-struct-ilr-scorer.R
score_ss_struct_ilr.RdScores each row of X independently with the frozen
fit_ss_struct_ilr model. Each specimen is restricted to the frozen
training feature universe present in X, ILR balances are computed from the
specimen's own values via ws_balance_ilr (the per-sample pseudocount
makes balances scale-invariant), standardised with the frozen train mean/sd, and
combined with the frozen diagonal-LDA weights. No scored-batch centering, quantiles,
or renormalisation is used, so the scorer is row-equivariant
(singlesample_assert_row_equivariant). Specimens with no constructible
balance receive the neutral score 0.
Arguments
- model
A
ss_struct_ilr_modelfromfit_ss_struct_ilr.- X
Numeric matrix (samples x features) of non-negative abundances; named cols.
- meta
Optional per-sample metadata; accepted for interface uniformity, ignored.