← ClaudeAtlas

scikit-survival-analysislisted

Time-to-event modeling with scikit-survival: Cox PH (elastic net), Random Survival Forests, Boosting, SVMs for censored data. C-index, Brier, time-dependent AUC; Kaplan-Meier, Nelson-Aalen, competing risks. Pipeline/GridSearchCV compatible. Use statsmodels for frequentist, pymc for Bayesian, lifelines for parametric.
jaechang-hits/SciAgent-Skills · ★ 199 · AI & Automation · score 81
Install: claude install-skill jaechang-hits/SciAgent-Skills
# scikit-survival -- Survival Analysis ## Overview scikit-survival is a Python library for time-to-event analysis built on scikit-learn. It handles right-censored data (observations where the event has not yet occurred) using Cox models, ensemble methods, survival SVMs, and non-parametric estimators. All models follow the scikit-learn `fit/predict` API and integrate with Pipelines, cross-validation, and GridSearchCV. ## When to Use - Modeling time-to-event outcomes with right-censored data (clinical trials, reliability) - Fitting Cox proportional hazards models (standard or elastic net penalized) - Building ensemble survival models (Random Survival Forest, Gradient Boosting) - Training survival SVMs for margin-based learning on medium-sized datasets - Evaluating survival predictions with censoring-aware metrics (C-index, Brier score, AUC) - Estimating non-parametric survival curves (Kaplan-Meier, Nelson-Aalen) - Analyzing competing risks with cumulative incidence functions - High-dimensional survival data with automatic feature selection (CoxNet L1/L2) - For **simpler parametric models** (Weibull, log-normal AFT) or statistical tests (log-rank), use `lifelines` - For **deep learning survival models**, use `pycox` or `torchlife` ## Prerequisites ```bash pip install scikit-survival scikit-learn pandas numpy matplotlib ``` **Python**: >= 3.9. **Dependencies**: scikit-learn, numpy, scipy, pandas, joblib, osqp (for some SVM solvers). **Data format**: Survival outcomes are