Fit REO-UCell within-sample rank discriminator
Source:R/singlesample-reo-scorers.R
fit_reo_ucell.RdLearns a frozen up/down feature signature from training data using
within-sample ranks, then stores only that signature and fixed
hyperparameters for single-sample UCell-style scoring. Training ranks are
computed per sample with rank 1 assigned to the most abundant feature. A
feature elevated in cases therefore has a lower mean case rank than control
rank, and is selected by
mean_rank_controls - mean_rank_cases. No test data or test-time batch
statistics are used.
Usage
fit_reo_ucell(X_train, y_train, meta_train = NULL, hp = list())Arguments
- X_train
Numeric matrix (samples \(\times\) features) of non-negative abundance values. Columns must be uniquely named feature ids.
- y_train
Integer/numeric 0/1 labels aligned to
X_train; 1 is case/disease and 0 is control.- meta_train
Optional per-sample metadata. Accepted for interface uniformity and ignored by this method.
- hp
List of frozen hyperparameters:
ksignature size per direction (defaultmin(25L, floor(ncol(X_train) / 4)), at least 1),maxRankUCell rank cap (defaultmin(1500L, ncol(X_train))), anduse_downlogical (defaultTRUE). These are resolved once during fitting and are not tuned insidefit_reo_ucell().
Value
A plain list of class reo_ucell_model containing
up_features, down_features, maxRank,
feature_universe, use_down, k, and the resolved
hp.