scikit-survival

Perform censoring-aware survival analysis with Cox, ensemble, and SVM models in Python.

94|11|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/swaruplab/operon --skill scikit-survival-swaruplab
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scikit-survival
Source: https://github.com/swaruplab/operon/tree/main/src-tauri/protocols/scikit-survival
Command: npx skills add https://github.com/swaruplab/operon --skill scikit-survival-swaruplab

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Python-based survival analysis toolkit that provides a comprehensive set of models and utilities to analyze time-to-event data with censoring, competing risks, and censoring-aware evaluation.

Core Features & Use Cases

  • Cox proportional hazards models (CoxPHSurvivalAnalysis) for standard survival analysis with interpretable coefficients
  • Penalized Cox models (CoxnetSurvivalAnalysis) for high-dimensional data and feature selection
  • IPCRidge for ridge-regularized accelerated failure time modeling
  • Ensemble methods (RandomSurvivalForest, GradientBoostingSurvivalAnalysis, ComponentwiseGradientBoostingSurvivalAnalysis, ExtraSurvivalTrees) for non-linear relationships
  • Survival SVM variants (FastSurvivalSVM, FastKernelSurvivalSVM, HingeLossSurvivalSVM) for margin-based risk ranking
  • Comprehensive evaluation (Harrell's C-index, Uno's C-index via IPCW, time-dependent AUC, Brier score)
  • Non-parametric estimations (Kaplan-Meier, Nelson-Aalen) and competing risks analysis
  • Seamless integration with scikit-learn pipelines and data preprocessing utilities

Quick Start

Provide a basic survival model by loading your data as X and y and fitting a CoxPHSurvivalAnalysis estimator.

Frequently Asked Questions about scikit-survival

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

FAQPage Schema
How do I perform survival analysis with right-censored time-to-event data in Python?

Survival analysis on right-censored time-to-event data in Python is performed using Cox proportional hazards models, survival SVMs, or ensemble methods like Random Survival Forest. These estimators handle censoring-aware fitting to predict event risks over time.

Can I evaluate survival model performance using time-dependent AUC and Brier score?

You can evaluate survival model performance using time-dependent AUC, Brier score, Harrell's C-index, and Uno's C-index. These metrics account for censoring-aware evaluation to provide accurate discrimination and calibration measurements for time-to-event predictions.

Does scikit-survival integrate with scikit-learn pipelines for data preprocessing?

Survival analysis models integrate seamlessly with scikit-learn pipelines for data preprocessing. This allows you to combine scaling, imputation, and feature selection steps directly with survival estimators like CoxPHSurvivalAnalysis or RandomSurvivalForest in a unified workflow.

What is the best way to handle high-dimensional data and feature selection in survival analysis?

The best way to handle high-dimensional data in survival analysis is using penalized Cox models like CoxnetSurvivalAnalysis. This approach applies L1 or L2 penalties to perform feature selection while fitting the survival model, preventing overfitting on datasets with many features.

How do competing risks affect survival analysis, and can Python model them?

Competing risks occur when multiple distinct event types prevent the primary event of interest from happening, and Python can model them using non-parametric estimations. The survival analysis toolkit provides specialized methods to estimate cumulative incidence functions in the presence of competing risks.