Targets and horizons API
survfm.pseudo_rmst.jackknife_pseudo_rmst_fast_exact(time, event, tau, *, clip=True, batch_size=256)
Compute exact, memory-bounded leave-one-out pseudo-RMST targets.
This evaluates the same full jackknife definition used by the submitted benchmark, but computes the full event-time grid once and evaluates delete-one curves in bounded patient batches. It is not an influence- function, subsampled, grouped, split, or cross-fitted approximation.
The submitted Kaplan-Meier convention keeps observations with
time >= event_time in the risk set, including censoring tied with an
event. Events at tau do not alter the integral over [0, tau].
Final clipping to [0, tau] defaults to the submitted behavior.
Source code in survfm/pseudo_rmst.py
survfm.pseudo_rmst.jackknife_pseudo_rmst(time_or_frame, event=None, tau=None, *, clip=True)
Construct jackknife pseudo-observation RMST targets.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
time_or_frame
|
Either a sequence of observed times or a DataFrame with |
required | |
event
|
Binary event indicators when |
None
|
|
tau
|
float | None
|
Restriction horizon. If the first argument is a DataFrame, |
None
|
clip
|
bool
|
If true, clip pseudo-targets to |
True
|
Source code in survfm/pseudo_rmst.py
survfm.pseudo_rmst.km_rmst(time, event, tau)
Compute Kaplan-Meier restricted mean survival time up to tau.
Source code in survfm/pseudo_rmst.py
survfm.horizons.select_rmst_horizon(time, event, *, quantile=0.8, min_events=5)
Select tau from a quantile of observed training-fold event times.
Only the training outcomes supplied to this function are used. This helper
implements the benchmark convention and is intended for generic benchmark
use. In a disease-specific application, tau should preferably be
prespecified from the clinical decision horizon and follow-up support.
Source code in survfm/horizons.py
survfm.horizons.HorizonSelection
dataclass
Audit record for a training-derived RMST horizon.