Survival analysis in Python
Project description
lifelines
=======
[What is survival analysis and why should I learn it?](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/lifelines/master/Tutorial%20and%20Examples.ipynb) 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 uncertainity (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 exicting applications of this
lesser-known technique, for example:
- SaaS providers are interested in measuring customer lifetimes;
- ecommerce shops are interested the time between first and second order (called *repeat purchase rate*).
- sociologists are interested in measure political parties lifetimes, or relationships, or marriages
- and many others
*lifelines* is a pure Python implementation of the best parts of survival analysis. We'd love to hear if you use *lifelines*, please ping me at [@cmrn_dp](https://twitter.com/Cmrn_DP) and let me know your
thoughts on the library.
####Dependencies:
The usual Python data stack: numpy, scipy, pandas (a modern version please), matplotlib (optional).
#### Installation:
You can install *lifelines* using
pip install -U git+https://github.com/CamDavidsonPilon/lifelines.git
from the command line.
## (Quick) Intro to *lifelines* and survival analysis
*Work in progress (75%)*
If you are new to survival analysis, wondering why it is useful, or are interested in *lifelines* examples and use,
I recommend running the `Tutorial and Examples.ipynb` notebook in a IPython notebook session. Alternatively, you can [view it online here](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/lifelines/master/Tutorial%20and%20Examples.ipynb).
## Documentation
*Work in progress (70%)*
I've added documentation to a notebook, `Documentation.ipynb`, that adds detail to
the classes, methods and data types. You can use the IPython notebook to view it, or [view it online](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/lifelines/master/Documentation.ipynb).
#### More examples
There are some IPython notebook files in the repo, and you can view them online here (though they may
contain syntax from older versions of *lifelines*.)
- [Divorce data](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/lifelines/master/datasets/Divorces%2520Rates.ipynb)
- [Gehan's survival dataset](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/lifelines/master/datasets/The%2520Gehan%2520Survival%2520Data.ipynb)
=======
[What is survival analysis and why should I learn it?](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/lifelines/master/Tutorial%20and%20Examples.ipynb) 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 uncertainity (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 exicting applications of this
lesser-known technique, for example:
- SaaS providers are interested in measuring customer lifetimes;
- ecommerce shops are interested the time between first and second order (called *repeat purchase rate*).
- sociologists are interested in measure political parties lifetimes, or relationships, or marriages
- and many others
*lifelines* is a pure Python implementation of the best parts of survival analysis. We'd love to hear if you use *lifelines*, please ping me at [@cmrn_dp](https://twitter.com/Cmrn_DP) and let me know your
thoughts on the library.
####Dependencies:
The usual Python data stack: numpy, scipy, pandas (a modern version please), matplotlib (optional).
#### Installation:
You can install *lifelines* using
pip install -U git+https://github.com/CamDavidsonPilon/lifelines.git
from the command line.
## (Quick) Intro to *lifelines* and survival analysis
*Work in progress (75%)*
If you are new to survival analysis, wondering why it is useful, or are interested in *lifelines* examples and use,
I recommend running the `Tutorial and Examples.ipynb` notebook in a IPython notebook session. Alternatively, you can [view it online here](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/lifelines/master/Tutorial%20and%20Examples.ipynb).
## Documentation
*Work in progress (70%)*
I've added documentation to a notebook, `Documentation.ipynb`, that adds detail to
the classes, methods and data types. You can use the IPython notebook to view it, or [view it online](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/lifelines/master/Documentation.ipynb).
#### More examples
There are some IPython notebook files in the repo, and you can view them online here (though they may
contain syntax from older versions of *lifelines*.)
- [Divorce data](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/lifelines/master/datasets/Divorces%2520Rates.ipynb)
- [Gehan's survival dataset](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/lifelines/master/datasets/The%2520Gehan%2520Survival%2520Data.ipynb)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lifelines-0.2.0.tar.gz
(1.2 MB
view details)
Built Distribution
File details
Details for the file lifelines-0.2.0.tar.gz
.
File metadata
- Download URL: lifelines-0.2.0.tar.gz
- Upload date:
- Size: 1.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3049b62cdd0e2845add4b868b5e3ecd64c80397d686921ff29057b193b96cc92 |
|
MD5 | ddd718d08b7addc23c851701007d0a60 |
|
BLAKE2b-256 | cc20b2c9f73a28801fe07b0665961f21899080b1ca7a81e242565c643d131420 |
File details
Details for the file lifelines-0.2.0.macosx-10.8-x86_64.exe
.
File metadata
- Download URL: lifelines-0.2.0.macosx-10.8-x86_64.exe
- Upload date:
- Size: 1.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 516c98b03dc29fba768abdf994024832ebd63c5b45f22fcc5caa167df793c3f0 |
|
MD5 | 1df5772b15e81b941f0426af28b8fb20 |
|
BLAKE2b-256 | 4015c0406cd178e6957cc83dd8f35843fb4c87b2859c668ccd21e4f1cd3910d3 |