Skip to content

Commit

Permalink
Merge pull request #100 from CamDavidsonPilon/v0.5.0
Browse files Browse the repository at this point in the history
v0.5.0
  • Loading branch information
CamDavidsonPilon committed Dec 7, 2014
2 parents ee278b0 + a6c333e commit 908e3a8
Show file tree
Hide file tree
Showing 25 changed files with 4,218 additions and 5,759 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ install:
- conda info -a

# Should match requirements.txt
- conda create -n test-environment python=$TRAVIS_PYTHON_VERSION pip numpy scipy pandas matplotlib
- conda create -n test-environment python=$TRAVIS_PYTHON_VERSION pip numpy scipy pandas matplotlib pytest
- source activate test-environment
# Build in place so we can run tests
- python setup.py build_ext --inplace
# command to run tests
script: python -m lifelines.tests.test_suite
script: python -m lifelines.tests -vv
# Don't want notifications
notifications:
email: false
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
### Changelogs

#### 0.5.0

- move testing to py.test
- refactor tests into smaller files
- make `test_pairwise_logrank_test_with_identical_data_returns_inconclusive` a better test
- add test for summary()
- Alternate metrics can be used for `k_fold_cross_validation`.


#### 0.4.4

- Lots of improvements to numerical stability (but something things still need work)
- Additions to `summary` in CoxPHFitter.
- Make all prediction methods output a DataFrame
- Fixes bug in 1-d input not returning in CoxPHFitter
- Lots of new tests.

####0.4.3
- refactoring of `qth_survival_times`: it can now accept an iterable (or a scalar still) of probabilities in the q argument, and will return a DataFrame with these as columns. If len(q)==1 and a single survival function is given, will return a scalar, not a DataFrame. Also some good speed improvements.
- KaplanMeierFitter and NelsonAalenFitter now have a `_label` property that is passed in during the fit.
Expand Down Expand Up @@ -45,4 +62,4 @@
- `CoxFitter` implements Cox Proportional Hazards model in lifelines.
- lifelines moves the wheels distributions.
- tests in the `statistics` module now prints the summary (and still return the regular values)
- new `BaseFitter` class is inherited from all fitters.
- new `BaseFitter` class is inherited from all fitters.
20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ lifelines
[What is survival analysis and why should I learn it?](http://lifelines.readthedocs.org/en/latest/Survival%20Analysis%20intro.html)
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 exciting applications of this
But outside of medicine and actuarial science, there are many other interesting and exciting applications of this
lesser-known technique, for example:
- SaaS providers are interested in measuring customer lifetimes, or time to first behaviours.
- sociologists are interested in measure political parties lifetimes, or relationships, or marriages
- Businesses are interested in what variables affect lifetime value

*lifelines* is a pure Python implementation of the best parts of survival analysis. We'd love to hear if you are using *lifelines*, please leave an Issue and let us know your
thoughts on the library.
*lifelines* is a pure Python implementation of the best parts of survival analysis. We'd love to hear if you are using *lifelines*, please leave an Issue and let us know your
thoughts on the library.

### Installation:

Expand All @@ -26,8 +26,8 @@ The usual Python data stack: Numpy, Scipy, Pandas (a modern version please), Mat

#### Installing

You can install *lifelines* using
You can install *lifelines* using

pip install lifelines


Expand All @@ -36,7 +36,13 @@ Or getting the bleeding edge version with:
pip install --upgrade --no-deps git+https://github.com/CamDavidsonPilon/lifelines.git


from the command line.
from the command line.

#### Running the tests

You can optionally run the test suite after install with

python -m lifelines.tests


### *lifelines* Documentation and an Intro to Survival Analysis
Expand All @@ -50,7 +56,7 @@ please check out the [Documentation and Tutorials page](http://lifelines.readthe

## License

The Feedback MIT License (FMIT)
The Feedback MIT License (FMIT)

Copyright (c) 2013, Cameron Davidson-Pilon

Expand Down
130 changes: 0 additions & 130 deletions lifelines/_cox_regression.py

This file was deleted.

Binary file removed lifelines/_statistics.cpython-34m.so
Binary file not shown.
File renamed without changes.
105 changes: 105 additions & 0 deletions lifelines/datasets/CuZn-LeftCensoredDataset.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
C,T,group
0,1.0,alluvial_fan
0,1.0,alluvial_fan
0,1.0,alluvial_fan
0,1.0,alluvial_fan
1,1.0,alluvial_fan
1,1.0,alluvial_fan
1,1.0,alluvial_fan
1,1.0,alluvial_fan
1,1.0,alluvial_fan
1,2.0,alluvial_fan
1,2.0,alluvial_fan
1,2.0,alluvial_fan
1,2.0,alluvial_fan
1,2.0,alluvial_fan
1,2.0,alluvial_fan
1,2.0,alluvial_fan
1,2.0,alluvial_fan
1,2.0,alluvial_fan
1,2.0,alluvial_fan
1,2.0,alluvial_fan
1,2.0,alluvial_fan
1,2.0,alluvial_fan
1,2.0,alluvial_fan
1,2.0,alluvial_fan
1,2.0,alluvial_fan
1,2.0,alluvial_fan
1,2.0,alluvial_fan
1,2.0,alluvial_fan
1,2.0,alluvial_fan
1,2.0,alluvial_fan
1,3.0,alluvial_fan
1,3.0,alluvial_fan
1,3.0,alluvial_fan
1,3.0,alluvial_fan
1,3.0,alluvial_fan
1,3.0,alluvial_fan
1,4.0,alluvial_fan
1,4.0,alluvial_fan
1,4.0,alluvial_fan
0,5.0,alluvial_fan
0,5.0,alluvial_fan
0,5.0,alluvial_fan
0,5.0,alluvial_fan
0,5.0,alluvial_fan
0,5.0,alluvial_fan
0,5.0,alluvial_fan
0,5.0,alluvial_fan
1,5.0,alluvial_fan
1,5.0,alluvial_fan
1,5.0,alluvial_fan
1,7.0,alluvial_fan
1,7.0,alluvial_fan
1,7.0,alluvial_fan
1,8.0,alluvial_fan
1,9.0,alluvial_fan
0,1.0,basin_trough
0,1.0,basin_trough
1,1.0,basin_trough
1,1.0,basin_trough
1,1.0,basin_trough
1,1.0,basin_trough
1,1.0,basin_trough
1,1.0,basin_trough
1,1.0,basin_trough
0,2.0,basin_trough
0,2.0,basin_trough
1,2.0,basin_trough
1,2.0,basin_trough
1,2.0,basin_trough
1,2.0,basin_trough
1,3.0,basin_trough
1,3.0,basin_trough
1,3.0,basin_trough
1,3.0,basin_trough
1,3.0,basin_trough
1,3.0,basin_trough
1,3.0,basin_trough
1,3.0,basin_trough
1,4.0,basin_trough
1,4.0,basin_trough
1,4.0,basin_trough
1,4.0,basin_trough
1,4.0,basin_trough
0,5.0,basin_trough
0,5.0,basin_trough
0,5.0,basin_trough
0,5.0,basin_trough
0,5.0,basin_trough
1,5.0,basin_trough
1,6.0,basin_trough
1,6.0,basin_trough
1,8.0,basin_trough
1,9.0,basin_trough
1,9.0,basin_trough
0,10.0,basin_trough
0,10.0,basin_trough
0,10.0,basin_trough
0,10.0,basin_trough
1,12.0,basin_trough
1,14.0,basin_trough
0,15.0,basin_trough
1,15.0,basin_trough
1,17.0,basin_trough
1,23.0,basin_trough
Loading

0 comments on commit 908e3a8

Please sign in to comment.