MCPcopy Index your code
hub / github.com/CamDavidsonPilon/lifelines

github.com/CamDavidsonPilon/lifelines @v0.30.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.30.3 ↗ · + Follow
1,432 symbols 5,771 edges 69 files 369 documented · 26% 1 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

PyPI version Anaconda-Server Badge DOI

What is survival analysis and why should I learn it? Survival analysis was originally developed and applied heavily by the actuarial and medical community. Its purpose was to answer why do events occur now versus later under uncertainty (where events might refer to deaths, disease remission, etc.). This is great for researchers who are interested in measuring lifetimes: they can answer questions like what factors might influence deaths?

But outside of medicine and actuarial science, there are many other interesting and exciting applications of survival analysis. For example: - SaaS providers are interested in measuring subscriber lifetimes, or time to some first action - inventory stock out is a censoring event for true "demand" of a good. - sociologists are interested in measuring political parties' lifetimes, or relationships, or marriages - A/B tests to determine how long it takes different groups to perform an action.

lifelines is a pure Python implementation of the best parts of survival analysis.

Documentation and intro to survival analysis

If you are new to survival analysis, wondering why it is useful, or are interested in lifelines examples, API, and syntax, please read the Documentation and Tutorials page

Contact

Development

See our Contributing guidelines.

Core symbols most depended-on inside this repo

fit
called by 439
lifelines/fitters/__init__.py
fit
called by 95
lifelines/fitters/coxph_fitter.py
plot
called by 57
lifelines/fitters/__init__.py
predict_survival_function
called by 44
lifelines/fitters/coxph_fitter.py
groupby
called by 39
lifelines/utils/__init__.py
safe_exp
called by 38
lifelines/utils/safe_exp.py
fit_interval_censoring
called by 35
lifelines/fitters/coxph_fitter.py
print_summary
called by 35
lifelines/fitters/coxph_fitter.py

Shape

Method 1,017
Function 308
Class 107

Languages

Python100%

Modules by API surface

lifelines/tests/test_estimation.py485 symbols
lifelines/fitters/__init__.py152 symbols
lifelines/utils/__init__.py98 symbols
lifelines/tests/utils/test_utils.py96 symbols
lifelines/fitters/coxph_fitter.py89 symbols
lifelines/tests/test_plotting.py78 symbols
lifelines/tests/test_statistics.py42 symbols
lifelines/statistics.py30 symbols
lifelines/datasets/__init__.py28 symbols
lifelines/fitters/cox_time_varying_fitter.py24 symbols
lifelines/fitters/aalen_additive_fitter.py23 symbols
lifelines/plotting.py22 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add lifelines \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page