scikit-survival

Build and evaluate censored survival models with scikit-survival in Python.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/gabrielvuksani/wotann --skill scikit-survival-gabrielvuksani
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scikit-survival
Source: https://github.com/gabrielvuksani/wotann/tree/main/skills/scientific/scikit-survival
Command: npx skills add https://github.com/gabrielvuksani/wotann --skill scikit-survival-gabrielvuksani

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

scikit-survival helps you analyze time-to-event outcomes while correctly handling censored data, so you can build and evaluate models without bias from missing event information.

Core Features & Use Cases

  • Survival modeling with censoring support: fit Cox models, penalized Cox, accelerated failure time (IPCRidge), Random Survival Forests, Gradient Boosting, and Survival SVMs for right-censored data.
  • Survival outcome construction: create structured targets using Surv.from_arrays or Surv.from_dataframe.
  • Evaluation that matches the problem: compute concordance metrics (Harrell’s and Uno’s C-index), time-dependent AUC, and Brier/Integrated Brier scores.
  • Competing risks workflows: estimate cumulative incidence functions and compare/fit cause-specific analyses.
  • Reference-ready guidance: includes dedicated reference docs for Cox models, ensembles, evaluation metrics, data handling, SVMs, and competing risks.

Use case example: You have a clinical dataset with censored follow-up and want to estimate how covariates affect event time, then compare models using Uno’s C-index and Integrated Brier score.

Quick Start

Use the scikit-survival skill to build a Cox proportional hazards model on your right-censored dataset and report Uno’s C-index and Integrated Brier score.

Frequently Asked Questions about scikit-survival

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

FAQPage Schema
How do I build a survival model with censored data in Python?

To build a survival model with censored data in Python, use scikit-survival to create structured targets with Surv.from_arrays, then fit models like Cox proportional hazards or Random Survival Forests that correctly account for right-censored observations.

What metrics can I use to evaluate survival models on censored datasets?

Evaluate survival models on censored datasets using censoring-aware metrics like Harrell's and Uno's C-index, cumulative_dynamic_auc for time-dependent AUC, and integrated_brier_score to measure prediction accuracy over time.

Can I estimate competing risks cumulative incidence functions in Python?

Yes, you can estimate competing risks cumulative incidence functions in Python using scikit-survival, which supports cause-specific analyses and cumulative incidence estimation for datasets where multiple event types can occur.

Does scikit-survival support Random Survival Forests and Gradient Boosting for time-to-event analysis?

Yes, scikit-survival supports Random Survival Forests and Gradient Boosting for time-to-event analysis, alongside penalized Cox models, accelerated failure time (IPCRidge), and Survival SVMs for right-censored data.

What's the best way to compare Cox models with survival SVMs on clinical datasets?

Compare Cox models with survival SVMs on clinical datasets by fitting both using scikit-survival, then evaluating their discrimination and calibration using Uno's C-index and Integrated Brier score to determine which generalizes better.

Why do I need structured targets for survival analysis instead of standard regression labels?

You need structured targets for survival analysis because censored data requires both event time and censoring indicators. Using Surv.from_dataframe or Surv.from_arrays pairs these values so models correctly handle missing event information without bias.