- Home
- Skills
- Kjgarza
- Marketplace Claude
- Scikit Survival
scikit-survival_skill
- Python
2
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill kjgarza/marketplace-claude --skill scikit-survival- SKILL.md14.7 KB
Overview
This skill is a comprehensive toolkit for survival analysis and time-to-event modeling in Python using the scikit-survival library. It supports censored data workflows, interpretable Cox models, ensemble and SVM-based survival learners, and competing risks. Use it to build, evaluate, and compare models with metrics that account for censoring.
How this skill works
The skill wraps scikit-survival primitives for creating survival outcomes, preprocessing covariates, fitting models (Cox, penalized Cox, Random Survival Forests, Gradient Boosting, Survival SVMs) and producing risk scores or survival functions. It includes evaluation utilities (Harrell/Uno C-index, time-dependent AUC, Brier scores), nonparametric estimators (Kaplan-Meier, Nelson-Aalen), and competing risk estimators. Integration with scikit-learn pipelines and cross-validation scorers enables reproducible model selection and hyperparameter tuning.
When to use it
- When analyzing time-to-event data with right-, left- or interval-censoring.
- When you need interpretable hazard models (Cox) or penalized selection for high-dimensional data.
- When non-linear effects or complex interactions justify Random Survival Forests or Gradient Boosting.
- When you must evaluate models with censoring-aware metrics (Uno's C-index, integrated Brier score).
- When competing risks are present and cause-specific probabilities are required.
Best practices
- Standardize features for SVMs and regularized Cox models before fitting.
- Prefer Uno's C-index over Harrell's when censoring is moderate to high (>40%).
- Report multiple metrics (C-index, integrated Brier score, time-dependent AUC) for discrimination and calibration.
- Validate proportional hazards assumption for Cox models or choose nonparametric/ensemble alternatives.
- Use cross-validation with censoring-aware scorers and document censoring rates and mechanisms.
Example use cases
- Fit a CoxPH model with standardized covariates for interpretable hazard ratios and risk scoring.
- Apply CoxnetSurvivalAnalysis to high-dimensional genomic data to select predictive features.
- Train Random Survival Forest or Gradient Boosting for best predictive performance on large datasets.
- Estimate cumulative incidence functions for competing risks (cause-specific probabilities).
- Compare multiple models via cross-validation using as_concordance_index_ipcw_scorer and integrated Brier scores.
FAQ
Use Harrell's C-index for low censoring (<40%) and Uno's C-index for moderate to high censoring; Uno's is more robust under heavy censoring.
Do I need to scale features?
Yes—always standardize features for SVMs and regularized Cox methods to ensure stable optimization and comparable penalties.