scikit-survival

Fit survival models and evaluate with C-index, AUC, and Brier score.

1|Updated Jan 14, 2026
One-click install
npx skills add https://github.com/Sologa/codex-pipeline --skill scikit-survival-sologa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scikit-survival
Source: https://github.com/Sologa/codex-pipeline/tree/main/.codex/skills/scikit-survival
Command: npx skills add https://github.com/Sologa/codex-pipeline --skill scikit-survival-sologa

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive toolkit for performing survival analysis and time-to-event modeling in Python, specifically designed to handle censored data.

Core Features & Use Cases

  • Model Fitting: Supports various survival models including Cox Proportional Hazards, Random Survival Forests, Gradient Boosting, and Survival SVMs.
  • Data Handling: Includes utilities for creating survival outcomes, preprocessing data, and validating its quality.
  • Evaluation: Offers robust metrics like Concordance Index (C-index), time-dependent AUC, and Brier Score for model assessment.
  • Use Case: Analyze patient data to predict time to disease recurrence, accounting for censored observations where patients may not have experienced recurrence by the end of the study.

Quick Start

Use the scikit-survival skill to fit a Cox Proportional Hazards model to the provided survival data.

Frequently Asked Questions about scikit-survival

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

FAQPage Schema
How do I handle censored data for time-to-event modeling in Python?

Time-to-event modeling handles censored data by using specific survival analysis utilities to create survival outcomes, preprocess data, and validate quality before fitting models. This approach accommodates observations that haven't experienced the event by the study's end.

What is the best way to evaluate survival analysis model performance?

Evaluating survival analysis model performance involves calculating metrics like the Concordance Index (C-index), time-dependent AUC, and Brier Score. These metrics assess how accurately the model predicts the relative risk and discriminates between survival times.

Can I use Random Survival Forests and Cox Proportional Hazards models in the same workflow?

Yes, you can fit both Random Survival Forests and Cox Proportional Hazards models within the same workflow. The toolkit supports model selection across various algorithms including Gradient Boosting and Survival SVMs, allowing you to compare performance directly.

Does scikit-survival support competing risks analysis?

Yes, competing risks analysis is supported alongside standard survival analysis and time-to-event modeling. This allows you to model scenarios where multiple distinct event types can occur, preventing the first event from censoring the others.

When should I use Gradient Boosting instead of a Cox model for survival analysis?

You should use Gradient Boosting instead of a Cox model when your data violates the proportional hazards assumption or exhibits complex non-linear relationships. Gradient Boosting captures complex patterns that a standard Cox model cannot.

How do I predict time to disease recurrence with right-censored patient data?

To predict time to disease recurrence, you fit a survival model to patient data, explicitly accounting for right-censored observations where patients haven't experienced recurrence. The model evaluates risk factors and estimates event times using the available data.