Releases: CamDavidsonPilon/lifelines
Releases · CamDavidsonPilon/lifelines
v0.20.5
0.20.5 - 2019-04-08
New features
- performance improvements for
print_summary
.
API changes
utils.survival_events_from_table
returns an integer weight vector as well as durations and censoring vector.- in
AalenJohansenFitter
, thevariance
parameter is renamed tovariance_
to align with the usual lifelines convention.
Bug fixes
- Fixed an error in the
CoxTimeVaryingFitter
's likelihood ratio test when using strata. - Fixed some plotting bugs with
AalenJohansenFitter
v0.20.4
0.20.4
New features
- left-truncation support in AFT models, using the
entry_col
kwarg infit()
generate_datasets.piecewise_exponential_survival_data
for generating piecewise exp. data- Faster
print_summary
for AFT models.
API changes
- Pandas is now correctly pinned to >= 0.23.0. This was always the case, but not specified in setup.py correctly.
Bug fixes
- Better handling for extremely large numbers in
print_summary
PiecewiseExponentialFitter
is available withfrom lifelines import *
.
v0.20.3
0.20.3
New features
- Now
cumulative_density_
&survival_function_
are always present on a fittedKaplanMeierFitter
. - New attributes/methods on
KaplanMeierFitter
:plot_cumulative_density()
,confidence_interval_cumulative_density_
,plot_survival_function
andconfidence_interval_survival_function_
.
v0.20.2
0.20.2
New features
- Left censoring is now supported in univariate parametric models:
.fit(..., left_censorship=True)
. Examples are in the docs. - new dataset:
lifelines.datasets.load_nh4()
- Univariate parametric models now include, by default, support for the cumulative density function:
.cumulative_density_
,.confidence_interval_cumulative_density_
,plot_cumulative_density()
,cumulative_density_at_times(t)
. - add a
lifelines.plotting.qq_plot
for univariate parametric models that handles censored data.
API changes
plot_lifetimes
no longer reverses the order when plotting. Thanks @vpolimenov!- The
C
column inload_lcd
dataset is renamed toE
.
Bug fixes
- fixed a naming error in
KaplanMeierFitter
whenleft_censorship
was set to True,plot_cumulative_density_()
is nowplot_cumulative_density()
. - added some error handling when passing in timedeltas. Ideally, users don't pass in timedeltas, as the scale is ambiguous. However, the error message before was not obvious, so we do some conversion, warn the user, and pass it through.
qth_survival_times
for a truncated CDF would returnnp.inf
if the q parameter was below the truncation limit. This should have been-np.inf
v0.20.1
0.20.1
- Some performance improvements to
CoxPHFitter
(about 30%). I know it may seem silly, but we are now about the same or slighty faster than the Cox model in R'ssurvival
package (for some testing datasets and some configurations). This is a big deal, because 1) lifelines does more error checking prior, 2) R's cox model is written in C, and we are still pure Python/NumPy, 3) R's cox model has decades of development. - suppressed unimportant warnings
API changes
- Previously, lifelines always added a 0 row to
cph.baseline_hazard_
, even if there were no event at this time. This is no longer the case. A 0 will still be added if there is a duration (observed or not) at 0 occurs however.
v0.20.0
Changelog
0.20.0
- Starting with 0.20.0, only Python3 will be supported. Over 75% of recent installs where Py3.
- Updated minimum dependencies, specifically Matplotlib and Pandas.
New features
- smarter initialization for AFT models which should improve convergence.
API changes
inital_beta
in Cox model's.fit
is nowinitial_point
.initial_point
is now available in AFT models andCoxTimeVaryingFitter
- the DataFrame
confidence_intervals_
for univariate models is transposed now (previous parameters where columns, now parameters are rows).
Bug fixes
- Fixed a bug with plotting and
check_assumptions
.
v0.19.5
0.19.5
New features
plot_covariate_group
can accept multiple covariates to plot. This is useful for columns that have implicit correlation like polynomial features or categorical variables.- Convergence improvements for AFT models.
v0.19.4
0.19.4
Bug fixes
- remove some bad print statements in
CoxPHFitter
.
v0.19.3
0.19.3
New features
- new AFT models:
LogNormalAFTFitter
andLogLogisticAFTFitter
. - AFT models now accept a
weights_col
argument tofit
. - Robust errors (sandwich errors) are now avilable in AFT models using the
robust=True
kwarg infit
. - Performance increase to
print_summary
in theCoxPHFitter
andCoxTimeVaryingFitter
model.
v0.19.2
0.19.2
New features
ParametricUnivariateFitters
, likeWeibullFitter
, have smoothed plots when plotting (vs stepped plots)
Bug fixes
- The
ExponentialFitter
log likelihood value was incorrect - inference was correct however. - Univariate fitters are more flexiable and can allow 2-d and DataFrames as inputs.