Expand description
Library-side survival prediction pipeline.
Extracts the hazard/survival/cumulative-hazard math from the CLI’s
run_predict_survival so that both the CLI and the Python FFI can
share a single entry point. The CLI retains ownership of progress
bars, CSV writing, and uncertainty bounds; everything else (design
build, baseline + time basis evaluation, link/time wiggles, and
hazard/survival conversion) flows through predict_survival.
Structs§
- Competing
Risks Predict Result - Joint cause-specific competing-risks prediction result.
- Kaplan
Meier - Right-continuous Kaplan–Meier survival estimator
Ŝ(t) = ∏_{t_j ≤ t}(1 − d_j/n_j). - Survival
Predict Request - Inputs to the unified survival predict pipeline.
- Survival
Predict Result - Result of
predict_survival. - Survival
Time Columns - Resolved survival entry/exit column indices for a saved survival model.
Enums§
- Survival
Predict Error - Typed errors emitted by the survival prediction pipeline.
Functions§
- apply_
inverse_ link_ state_ to_ fit_ result - build_
saved_ survival_ marginal_ slope_ predictor - Build the saved survival marginal-slope predictor along with the matching
PredictInputand aUnifiedFitResultrepackaged into the layoutBernoulliMarginalSlopePredictor::from_unifiedexpects. - concat_
array1_ refs - Concatenate referenced 1-D arrays into a single owned
Array1<f64>. - fit_
result_ from_ saved_ model_ for_ prediction - Canonical saved fit result for prediction.
- harrell_
concordance - Harrell’s concordance index (C-index) of a survival risk score against
held-out outcomes. A larger
risk[i]must predict a SHORTER survival time (higher hazard). Over every orderable pair — pairs whose earlier observed time is a genuine event, so the failure ordering is observed — a pair is concordant when the earlier-failing subject carries the larger risk; equal risks score half credit.C = (concordant + 0.5·tied) / comparable.C = 0.5is random ranking,C = 1.0a perfect ordering. - integrated_
ipcw_ brier_ score - Integrated IPCW Brier score (IBS) — the time-integrated
ipcw_brier_score, matching scikit-survival’sintegrated_brier_scoreandpec’s integrated prediction-error curve. - ipcw_
brier_ score - IPCW (inverse-probability-of-censoring-weighted) Brier score of a predicted
survival probability at a fixed horizon
tauagainst held-out outcomes — the Graf et al. (1999) estimator used by scikit-survivalbrier_score,pec, andsurvival::brier. - predict_
competing_ risks_ survival - predict_
survival - Run the survival prediction pipeline.
- require_
saved_ survival_ likelihood_ mode - Extract the saved survival likelihood mode from the model payload.
- resolve_
saved_ survival_ time_ columns - Resolve saved survival entry/exit column names against the runtime
col_map, treating an absentsurvival_entryas the right-censored shorthand (entry times synthesized as zero downstream). - resolve_
survival_ inverse_ link_ from_ saved - Resolve the saved survival inverse-link from saved link metadata and fitted state.
- resolve_
termspec_ for_ prediction - Resolve the covariate
TermCollectionSpecfor prediction, remapping saved training-column indices onto the runtime dataset’s layout. - saved_
baseline_ timewiggle_ components - Rebuild the saved baseline-timewiggle entry/exit/derivative design blocks
from the saved runtime metadata. Returns
Nonewhen the saved model has no baseline-timewiggle. - saved_
survival_ location_ scale_ fit_ result - Resolve the saved survival location-scale fit result.
- saved_
survival_ runtime_ baseline_ config - Baseline config persisted by the saved survival model.