Random swaps of the history features while training
Source:R/imputeLongitudinal.R
history_dropout_inputs.RdWith history = TRUE, a subject never measured for a
biomarker has history features (count 0, a stand-in level) that the
network almost never sees while training, since every training row with
that biomarker observed comes from a subject who was measured. Faced with
them at imputation it extrapolated: in simulations it took the stand-in
for the subject's own level, imputed with too little spread, and biased
the fitted coefficients (the event-time coefficient by about 40%).
Training therefore swaps, at random, a row's history features for one
biomarker with their "unseen" version (see
history_features()), keeping the row's own values as targets, so
the network learns to impute that biomarker from the covariates and the
other biomarkers alone. Each biomarker's rate is the share of rows from
subjects never measured for it, at least 10%, and 0 (no swaps, as
before) when every subject has some value of it.