scikit-survival

Analyze censored time-to-event data with Python using scikit-survival.

1|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/SciMate-AI/scicli --skill scikit-survival-scimate-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scikit-survival
Source: https://github.com/SciMate-AI/scicli/tree/main/internal/skills/bundled/claude-scientific-skills/skills/scikit-survival
Command: npx skills add https://github.com/SciMate-AI/scicli --skill scikit-survival-scimate-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Analyze censored time-to-event data with Python using scikit-survival.

Core Features & Use Cases

  • Cox proportional hazards models and penalized variants (CoxPHSurvivalAnalysis, CoxnetSurvivalAnalysis, IPCRidge)
  • Ensemble methods for non-linear relationships (RandomSurvivalForest, GradientBoostingSurvivalAnalysis, ExtraSurvivalTrees)
  • Survival SVMs for ranking (FastSurvivalSVM, FastKernelSurvivalSVM, HingeLossSurvivalSVM)
  • Competing risks support with CIFs and cause-specific hazards
  • Integrated data handling with Surv objects and scikit-learn pipelines
  • Evaluation with concordance index, Uno's C-index, and Brier score
  • References and tutorials in the provided references/ directory

Quick Start

Install scikit-survival, prepare your survival data in the sksurv Surv format, then fit a CoxPHSurvivalAnalysis model to generate risk scores.

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?

To perform survival analysis on censored time-to-event data, you can use scikit-survival to prepare data in the Surv format and fit models like CoxPHSurvivalAnalysis to generate risk scores. It supports scikit-learn pipelines for integrated data handling.

What's the best way to evaluate a Cox proportional hazards model using scikit-learn?

The best way to evaluate a Cox model is by calculating the concordance index, Uno's C-index, and Brier score. The scikit-survival toolkit integrates with scikit-learn to provide these specific evaluation metrics for survival analysis.

Can I use random survival forests for non-linear relationships in time-to-event datasets?

Yes, you can use random survival forests for non-linear relationships in time-to-event datasets. The toolkit provides ensemble methods like RandomSurvivalForest, GradientBoostingSurvivalAnalysis, and ExtraSurvivalTrees to model complex data.

Does scikit-survival support competing risks and cause-specific hazards?

Yes, scikit-survival supports competing risks by calculating cumulative incidence functions (CIFs) and cause-specific hazards. This allows you to analyze datasets where multiple distinct events can occur.

How do Survival SVMs rank patients in healthcare research datasets?

Survival SVMs rank patients by optimizing a hinge loss function for survival data. The toolkit includes FastSurvivalSVM, FastKernelSurvivalSVM, and HingeLossSurvivalSVM to perform SVM-based ranking across research datasets.

What penalized variants are available for Cox models in Python survival analysis?

For Python survival analysis, penalized variants available for Cox models include CoxnetSurvivalAnalysis and IPCRidge. These models extend the standard Cox proportional hazards approach to handle high-dimensional data.