scikit-survival

Model and evaluate censored survival data with scikit-survival.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires scikit-survival, scikit-learn, numpy, pandas, matplotlib, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill provides comprehensive tools for coping with censored survival data, enabling users to perform rigorous analysis of time-to-event information in Python.

Core Features & Use Cases

  • Survival Modeling: Supports Cox proportional hazards, ensemble methods like Random Survival Forests, gradient boosting, and support vector machines for survival tasks.
  • Data Preparation: Facilitates creating survival outcomes from raw data, handles missing values, and encodes categorical variables.
  • Performance Evaluation: Offers metrics such as concordance indices, time-dependent AUC, and Brier scores for model assessment, suitable for benchmarking and validation.
  • Use Case: A healthcare data analyst can predict patient survival probabilities and identify risk factors using various models, then evaluate which performs best based on robust metrics.

Quick Start

Load data, preprocess features, select and fit a model, then evaluate its performance with a few lines of code to generate survival predictions and 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 survival data with censored observations in Python?

You can model survival data with censored observations in Python using scikit-survival to fit Cox proportional hazards, Random Survival Forests, gradient boosting, and support vector machines. It handles censored time-to-event data directly for robust analysis.

What metrics can I use to evaluate survival model performance?

Survival model performance can be evaluated using concordance indices, time-dependent AUC, and Brier scores. These metrics assess model discrimination and calibration, enabling you to benchmark and validate predictions on censored data effectively.

How do I prepare raw time-to-event data for survival analysis?

To prepare raw time-to-event data for survival analysis, you must create survival outcomes from your raw data, handle missing values, and encode categorical variables. This preprocessing ensures datasets are correctly structured for fitting survival models.

Does scikit-survival work with scikit-learn for machine learning tasks?

Yes, scikit-survival works with scikit-learn for machine learning tasks. It builds upon scikit-learn, numpy, and pandas, allowing you to integrate ensemble methods like Random Survival Forests and gradient boosting within your existing Python machine learning workflows.

What is the best way to compare Cox proportional hazards with ensemble survival models?

The best way to compare Cox proportional hazards with ensemble survival models is by fitting both using scikit-survival, then evaluating their performance using concordance indices and Brier scores. This provides robust metrics to identify the most accurate model.

When should I use a Random Survival Forest instead of a Cox model?

You should use a Random Survival Forest instead of a Cox model when your survival data has complex, non-linear relationships that violate proportional hazards assumptions. Ensemble methods like gradient boosting capture these intricate patterns better than linear models.