--- id: scikit-survival version: "0.28.0" license: GPL-3.0-or-later license_treatment: copyleft maintenance: active --- # scikit-survival — Survival analysis built on top of scikit-learn License: copyleft · Maintenance: active · Downloads: 280.1K/mo ## What it is and what it does scikit-survival is a Python library for survival analysis—modeling the time until an event occurs when some observations are censored (only partially observed). Unlike standard machine learning, survival analysis must account for the fact that some training records contain incomplete event information, such as patients in a clinical study who remain event-free at the end of monitoring. The library builds on scikit-learn, allowing you to use familiar preprocessing, cross-validation, and model-selection workflows while fitting survival-specific models that handle this censoring. The package requires modern Python (3.11 or later) and several numerical dependencies including numpy, scipy, pandas, and scikit-learn, plus optimization libraries ecos and osqp. Installation is straightforward on major platforms via conda-forge or pip, though a C/C++ compiler is needed for the compiled components. Use it for: - Clinical trials: predict time to patient recovery or adverse event while accounting for patients lost to follow-up. - Equipment reliability: model time-to-failure for machinery or components with incomplete failure records. - Customer churn: estimate time until customer departure when some customers remain active at study end. - Employee retention: analyze time-to-resignation with censored records for still-employed staff. - Loan default: predict time to default in credit portfolios where some loans mature without default. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. scikit-survival provides survival analysis models that handle censored data—where event times are only partially observed—built on top of scikit-learn's API and preprocessing tools. Yes, if you need survival analysis and accept GPL-3.0-or-later copyleft licensing. The package is actively maintained, well-integrated with scikit-learn, and handles the statistical complexities of censored data. Medium install friction (compiled dependencies, version constraints) is manageable on standard platforms. Not suitable for proprietary software without GPL compliance review. ## Install pip install scikit-survival uv add scikit-survival poetry add scikit-survival ## Installing scikit-survival Before you install: Medium install friction due to compiled dependencies (C/C++ compiler required) and multiple numerical libraries. Active maintenance with a release 40 days ago; supports current Python versions (3.11–3.14) with prebuilt wheels across major platforms. License in practice: GPL-3.0-or-later (copyleft): any derivative work or distribution must also be open-source under a compatible license. Acceptable for research and open-source projects; requires review before use in proprietary software. Quickstart: pip install scikit-survival import numpy import pandas from scikit-survival import linear_model model = linear_model.CoxPHFitter() model.fit(X, y) Requires C/C++ compiler and numpy 2.0.0 or later, pandas 2.2.0 or later, scikit-learn 1.9, narwhals 2.0.1 or later. Verify before relying: - Specific survival models available (e.g., Cox proportional hazards, Kaplan-Meier, random survival forests). - Whether the package provides confidence intervals or uncertainty quantification for survival predictions. - Support for competing risks or multi-state survival models beyond standard right-censored data. - Performance characteristics on large datasets or real-time prediction scenarios. ## Package facts - License: GPL-3.0-or-later (copyleft) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 280.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags survival analysis python, time-to-event modeling, censored data analysis, reliability analysis machine learning, scikit-learn survival models, right censoring prediction, event time prediction, survival-analysis, time-to-event, censored-data [View on SkillFed](https://skillfed.io/packages/scikit-survival) · [View on PyPI](https://pypi.org/project/scikit-survival/)