alterlab-scikit-survival

Model survival analysis with scikit-survival using Cox, ensemble, and SVM methods.

58|9|Updated Mar 16, 2026
One-click install
npx skills add https://github.com/AlterLab-IEU/AlterLab-Academic-Skills --skill alterlab-scikit-survival
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: alterlab-scikit-survival
Source: https://github.com/AlterLab-IEU/AlterLab-Academic-Skills/tree/main/skills/data-science/alterlab-scikit-survival
Command: npx skills add https://github.com/AlterLab-IEU/AlterLab-Academic-Skills --skill alterlab-scikit-survival

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Part of the AlterLab Academic Skills suite, this skill provides a comprehensive workflow for survival analysis in Python using scikit-survival, enabling researchers to work with censored data, time-to-event modeling, competing risks, and robust evaluation.

Core Features & Use Cases

  • Supports Cox proportional hazards models (CoxPHSurvivalAnalysis), penalized Cox (CoxnetSurvivalAnalysis), and IPCRidge.
  • Includes ensemble methods (RandomSurvivalForest, GradientBoostingSurvivalAnalysis, ExtraSurvivalTrees) and Survival SVMs (FastSurvivalSVM, FastKernelSurvivalSVM, HingeLossSurvivalSVM) for flexible modeling.
  • Facilitates data preprocessing, survival outcome creation with Surv, and competing risks analysis with CIFs, plus evaluation with concordance index and Brier score.
  • Real-world use: analyze censored studies, compare models, and predict risk or survival probabilities.

Quick Start

Load your dataset, prepare a Surv object, then fit a CoxPHSurvivalAnalysis model to obtain risk scores.

Frequently Asked Questions about alterlab-scikit-survival

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

FAQPage Schema
How do I handle censored data for survival analysis in Python?

To handle censored data for survival analysis in Python, you create a Surv object to structure your time-to-event outcomes, then fit models like CoxPHSurvivalAnalysis to process the censored observations and predict risk scores.

What's the best way to compare Cox models and Random Survival Forests for time-to-event modeling?

To compare Cox models and Random Survival Forests for time-to-event modeling, fit both algorithms on your prepared survival data and evaluate their predictive performance using metrics like the concordance index, time-dependent AUC, and Brier scores.

Can I model competing risks and cumulative incidence functions using scikit-survival?

Yes, you can model competing risks using scikit-survival by calculating cumulative incidence functions (CIFs), which allow you to estimate the probability of specific event types occurring over time in the presence of other competing events.

How do I evaluate survival model predictions using concordance index and Brier score?

You evaluate survival model predictions using the concordance index to measure ranking accuracy and the Brier score to assess prediction calibration over time, applying these metrics to risk scores or survival probabilities generated by your fitted models.

Does scikit-survival support penalized Cox regression and Survival SVMs for high-dimensional clinical data?

Yes, scikit-survival supports penalized Cox regression via CoxnetSurvivalAnalysis and Survival SVMs via FastSurvivalSVM, allowing you to apply these advanced ensemble and machine learning methods to high-dimensional clinical studies.

When should I use Gradient Boosting Survival Analysis instead of standard Cox proportional hazards models?

You should use Gradient Boosting Survival Analysis instead of standard Cox proportional hazards models when your data violates proportional hazards assumptions or requires capturing complex non-linear relationships for robust risk prediction.