survival-models

Train censor-aware survival models on right-censored time-to-event data with cross-validation.

89|5|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/CUHK-AIM-Group/NeuroDiscovery --skill survival-models-cuhk-aim-group
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: survival-models
Source: https://github.com/CUHK-AIM-Group/NeuroDiscovery/tree/main/skills/survival-models
Command: npx skills add https://github.com/CUHK-AIM-Group/NeuroDiscovery --skill survival-models-cuhk-aim-group

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, pandas, scipy, scikit-learn, joblib, torch, scikit-survival, xgboost, and includes scripts (resource) components.

What problem does it solve? Right-censored time-to-event outcomes such as disease progression, conversion, relapse, or mortality cannot be modeled as ordinary regression, and naive approaches produce biased predictions. This Skill trains censor-aware prognosis models from subject-level features while preserving proper handling of censored observations. ## Core Features & Use Cases - Multiple Survival Estimators: Supports Cox proportional hazards, Random Survival Forest, DeepSurv, and XGBoost Cox survival through a single CLI. - Censor-Aware Evaluation: Uses Harrell's concordance index with grouped cross-validation folds for multi-site cohorts, exporting risk scores, fold assignments, and metrics. - Use Case: Given a CSV of neuroimaging ROI features with follow-up days and a progression indicator, train a DeepSurv model with 5-fold grouped cross-validation to produce relative risk scores for each subject. ## Quick Start Train a Cox proportional hazards model on my prognosis.csv file using followup_days as the duration column and progressed as the event column with 5-fold cross-validation.

Frequently Asked Questions about survival-models

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I train a Cox proportional hazards model on censored data?

Run the training script with --model cox, providing a CSV with duration and binary event columns via --duration-col and --event-col. The script performs cross-validation and exports risk scores, fold assignments, and concordance metrics.

What is the difference between DeepSurv and Random Survival Forest?

DeepSurv is a neural network Cox risk model implemented in PyTorch, while Random Survival Forest is a tree-based ensemble from scikit-survival. Both are optional estimators requiring their respective packages to be installed.

Can I use XGBoost for survival analysis with censored outcomes?

Yes, select --model xgboost_survival to use XGBoost's survival:cox objective. The xgboost package must be installed separately, and tests for it are skipped when the package is unavailable.

Does the survival model output absolute risk probabilities?

No, the exported prediction is a relative risk score, not an absolute probability. Absolute risk requires separate calibration at a specified time horizon before clinical interpretation.

Why should censored observations not be treated as regression labels?

Converting censored observations into ordinary regression labels biases the model because the true event time is unknown. Censor-aware models use the event indicator and duration jointly to handle incomplete follow-up correctly.