unsurv: clustering individualized survival curves.
Imad El Badisy
AI and Data Science Service, Mohammed VI Center for Research and Innovation (CM6RI), Rabat, Morocco.
Key points
From the paper's conclusion- We introduce unsurv, an R package that clusters individualized survival curves on a common time grid using validity-preserving preprocessing, time-weighted integral distances, and partitioning around medoids (PAM). The output includes observed medoid prototype curves, a nearest-medoid rule for assigning new patients, model-selection summaries, resampling-based stability using the Adjusted Rand Index (ARI), and a new unsurv_compare() function for comparing partitions against baselines. The package is model-agnostic and can be paired with any survival learner that returns S ^ i ( t ) . We illustrate the workflow on a synthetic example and on the METABRIC breast cancer cohort using survdnn-predicted survival curves, including baseline comparisons and an out-of-sample validation check showing that the curve-based cluster ordering generalizes to held-out patients.
Abstract
MOTIVATION: Biomedical phenotyping workflows often cluster high-dimensional molecular or clinical covariates and then test survival differences post hoc. This can miss structure that is expressed primarily through the timing of risk, because two patients may have similar scalar risk at one horizon but different predicted survival trajectories. Many survival learners can output patient-specific curves { S ^ i ( t ) } i = 1 n on a common time scale. Clustering these curves gives a survival-native post-prediction representation for exploratory phenotyping. Existing work on survival-curve clustering mainly targets predefined Kaplan-Meier curves or general functional data, whereas a practical tool for individual-level predicted survival curves remains less developed. RESULTS: We introduce unsurv, an R package that clusters individualized survival curves on a common time grid using validity-preserving preprocessing, time-weighted integral distances, and partitioning around medoids (PAM). The output includes observed medoid prototype curves, a nearest-medoid rule for assigning new patients, model-selection summaries, resampling-based stability using the Adjusted Rand Index (ARI), and a new unsurv_compare() function for comparing partitions against baselines. The package is model-agnostic and can be paired with any survival learner that returns S ^ i ( t ) . We illustrate the workflow on a synthetic example and on the METABRIC breast cancer cohort using survdnn-predicted survival curves, including baseline comparisons and an out-of-sample validation check showing that the curve-based cluster ordering generalizes to held-out patients. AVAILABILITY AND IMPLEMENTATION: The unsurv package is available on CRAN and its full source code and documentation are provided at https://github.com/ielbadisy/unsurv under the MIT License.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- SurvICL: a Foundation Model for in-context Survival AnalysisarXiv · 2026
- Penalized likelihood optimization for adaptive neighborhood clustering in time-to-event data with group-level heterogeneity.Biostatistics (Oxford, England) · 2026
- KESurv: A Kernel Ensemble Method for Patient-Specific Survival PredictionarXiv · 2026
- Expert-Driven Survival Machines: Improving Stratification and Interpretability in Multiple Clinical Cohorts.ACM-BCB ... ... : the ... ACM Conference on Bioinformatics, Computational Biology and Biomedicine. ACM Conference on Bioinformatics, Computational Biology and Biomedicine · 2026
- Cure-Fraction Random Survival Forests: Separating Cure from LatencyarXiv · 2026
- A software package for simple and rigorous survival machine learning analysis in biomedical research.medRxiv : the preprint server for health sciences · 2026