scikit-survival

Model censored survival data with scikit-survival Cox and random survival forest methods.

74|5|Updated Dec 10, 2025
One-click install
npx skills add https://github.com/dralkh/seerai --skill scikit-survival-dralkh
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: scikit-survival
Source: https://github.com/dralkh/seerai/tree/main/skills/scikit-survival
Command: npx skills add https://github.com/dralkh/seerai --skill scikit-survival-dralkh

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you analyze censored time-to-event data with the right survival methods instead of forcing it into ordinary regression or classification workflows.

Core Features & Use Cases

  • Fits Cox proportional hazards, penalized Cox, random survival forests, gradient boosting, and survival SVM models.
  • Evaluates predictions with censoring-aware metrics such as Uno's C-index, time-dependent AUC, and Brier score.
  • Handles competing risks, survival object construction, preprocessing, and scikit-learn pipelines for research-grade modeling.
  • Example use case: compare several survival models on a biomedical dataset, tune hyperparameters with cross-validation, and report the best-performing model with calibrated evaluation metrics.

Quick Start

Use the scikit-survival skill to build a censored survival dataset, fit an appropriate model, and evaluate it with censoring-aware metrics.

Frequently Asked Questions about scikit-survival

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

FAQPage Schema
How do I model censored time-to-event data instead of using ordinary regression?▼

To model censored time-to-event data, you construct structured survival targets and fit Cox proportional hazards, random survival forests, or survival SVMs. This approach properly accounts for right-censoring rather than forcing incomplete event times into ordinary regression workflows.

What is the best way to evaluate survival models when some outcomes are censored?▼

Evaluating survival models with censored data requires censoring-aware metrics like Uno's C-index, time-dependent AUC, and Brier score. These metrics measure predictive accuracy correctly by accounting for incomplete observation periods instead of standard classification accuracy.

Can I use scikit-learn pipelines for survival analysis and hyperparameter tuning?▼

Yes, you can use scikit-learn pipelines for survival analysis by integrating feature preprocessing, cross-validation, and model comparison. This compatibility allows you to tune penalized Cox models, gradient boosting, and survival SVMs within standard training and validation workflows.

How do I handle competing risks in biomedical time-to-event datasets?▼

Handling competing risks in biomedical time-to-event datasets involves modeling multiple distinct event types simultaneously. This prevents biased risk estimates by correctly separating the probability of different terminal events rather than treating all outcomes as a single survival curve.

Does this survival analysis approach support random survival forests and gradient boosting?▼

Yes, this survival analysis approach supports random survival forests and gradient boosting for time-to-event outcomes. These tree-based ensemble methods capture non-linear covariate effects and complex interactions that linear Cox proportional hazards models may miss.