scikit-survival

Model censored survival data with Cox, ensemble, and SVM methods in Python.

33.0k|3.2k|Updated Oct 19, 2025
One-click install
npx skills add https://github.com/K-Dense-AI/scientific-agent-skills --skill scikit-survival-k-dense-ai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: scikit-survival
Source: https://github.com/K-Dense-AI/scientific-agent-skills/tree/main/scientific-skills/scikit-survival
Command: npx skills add https://github.com/K-Dense-AI/scientific-agent-skills --skill scikit-survival-k-dense-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

scikit-survival provides a Python-based toolkit for performing survival analysis with censored data, enabling time-to-event modeling and risk prediction.

Core Features & Use Cases

  • CoxPHSurvivalAnalysis, CoxnetSurvivalAnalysis, IPCRidge for Cox models
  • RandomSurvivalForest, GradientBoostingSurvivalAnalysis, ComponentwiseGradientBoostingSurvivalAnalysis, ExtraSurvivalTrees for ensemble methods
  • Survival SVMs: FastSurvivalSVM, FastKernelSurvivalSVM, HingeLossSurvivalSVM, NaiveSurvivalSVM
  • Data preprocessing, evaluation metrics (Harrell's C-index, Uno's IPCW C-index, time-dependent AUC, Brier score)
  • Competing risks analysis via cause-specific hazards and CIF estimation
  • Seamless integration with scikit-learn pipelines and built-in datasets for practice
  • Reference materials and tutorials provided in the references directory

Quick Start

Run a basic Cox model on your dataset and evaluate it with IPCW C-index.

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 on censored time-to-event data in Python?▼

Survival analysis on censored data in Python uses models like Cox proportional hazards and ensemble methods to estimate time-to-event outcomes. This toolkit integrates with scikit-learn pipelines to model censored datasets directly.

Can I use scikit-learn pipelines for risk prediction with censored data?▼

Yes, risk prediction with censored data works seamlessly within scikit-learn pipelines. You can chain preprocessing steps with models like CoxPHSurvivalAnalysis or RandomSurvivalForest to predict risk scores.

What evaluation metrics are available for survival models?▼

Survival models can be evaluated using Harrell's C-index, Uno's IPCW C-index, time-dependent AUC, and Brier score. These metrics measure ranking performance and prediction accuracy for censored time-to-event data.

How does survival SVM compare to Cox models for biomedical datasets?▼

Survival SVMs like FastSurvivalSVM offer ranking-based optimization, while Cox models estimate hazard ratios directly. Both handle censored biomedical datasets, but ensemble methods may capture non-linear effects better than standard Cox models.

When should I use penalized Cox models for survival prediction?▼

Penalized Cox models like CoxnetSurvivalAnalysis are used for survival prediction when dealing with high-dimensional data or multicollinearity. They apply regularization to prevent overfitting while modeling censored time-to-event outcomes.

Does this toolkit support competing risks analysis for cause-specific hazards?▼

Yes, competing risks analysis is supported via cause-specific hazards and cumulative incidence function (CIF) estimation. This allows modeling multiple event types when standard survival analysis assumptions are insufficient.