Releases: CamDavidsonPilon/lifelines
Releases · CamDavidsonPilon/lifelines
v0.19.1
0.19.1
New features
- improved stability of
LogNormalFitter
- Matplotlib for Python3 users are not longer forced to use 2.x.
API changes
- Important: we changed the parameterization of the
PiecewiseExponential
to the same asExponentialFitter
(from\lambda * t
tot / \lambda
).
v0.19.0
0.19.0
New features
- New regression model
WeibullAFTFitter
for fitting accelerated failure time models. Docs have been added to our documentation about how to useWeibullAFTFitter
(spoiler: it's API is similar to the other regression models) and how to interpret the output. CoxPHFitter
performance improvements (about 10%)CoxTimeVaryingFitter
performance improvements (about 10%)
API changes
- Important: we changed the
.hazards_
and.standard_errors_
on Cox models to be pandas Series (instead of Dataframes). This felt like a more natural representation of them. You may need to update your code to reflect this. See notes here: #636 - Important: we changed the
.confidence_intervals_
on Cox models to be transposed. This felt like a more natural representation of them. You may need to update your code to reflect this. See notes here: #636 - Important: we changed the parameterization of the
WeibullFitter
andExponentialFitter
from\lambda * t
tot / \lambda
. This was for a few reasons: 1) it is a more common parameterization in literature, 2) it helps in convergence. - Important: in models where we add an intercept (currently only
AalenAdditiveModel
), the name of the added column has been changed frombaseline
to_intercept
- Important: the meaning of
alpha
in all fitters has changed to be the standard interpretation of alpha in confidence intervals. That means that the default for alpha is set to 0.05 in the latest lifelines, instead of 0.95 in previous versions.
Bug Fixes
- Fixed a bug in the
_log_likelihood_
property ofParametericUnivariateFitter
models. It was showing the "average" log-likelihood (i.e. scaled by 1/n) instead of the total. It now displays the total. - In model
print_summary
s, correct a label erroring. Instead of "Likelihood test", it should have read "Log-likelihood test". - Fixed a bug that was too frequently rejecting the dtype of
event
columns. - Fixed a calculation bug in the concordance index for stratified Cox models. Thanks @airanmehr!
- Fixed some Pandas <0.24 bugs.
v0.18.6
0.18.6
- some improvements to the output of
check_assumptions
.show_plots
is turned toFalse
by default now. It only showsrank
andkm
p-values now. - some performance improvements to
qth_survival_time
.
v0.18.5
0.18.5
- added new plotting methods to parametric univariate models:
plot_survival_function
,plot_hazard
andplot_cumulative_hazard
. The last one is an alias forplot
. - added new properties to parametric univarite models:
confidence_interval_survival_function_
,confidence_interval_hazard_
,confidence_interval_cumulative_hazard_
. The last one is an alias forconfidence_interval_
. - Fixed some overflow issues with
AalenJohansenFitter
's variance calculations when using large datasets. - Fixed an edgecase in
AalenJohansenFitter
that causing some datasets with to be jittered too often. - Add a new kwarg to
AalenJohansenFitter
,calculate_variance
that can be used to turn off variance calculations since this can take a long time for large datasets. Thanks @pzivich!
v0.18.4
0.18.4
- fixed confidence intervals in cumulative hazards for parametric univarite models. They were previously
serverly depressed. - adding left-truncation support to parametric univarite models with the
entry
kwarg in.fit
v0.18.3
0.18.3
- Some performance improvements to parametric univariate models.
- Suppressing some irrelevant NumPy and autograd warnings, so lifeline warnings are more noticeable.
- Improved some warning and error messages.
v0.18.2
0.18.2
- New univariate fitter
PiecewiseExponentialFitter
for creating a stepwise hazard model. See docs online. - Ability to create novel parametric univariate models using the new
ParametericUnivariateFitter
super class. See docs online for how to do this. - Unfortunately, parametric univariate fitters are not serializable with
pickle
. The librarydill
is still useable. - Complete overhaul of all internals for parametric univariate fitters. Moved them all (most) to use
autograd
. LogNormalFitter
no longer modelslog_sigma
.
v0.18.1
0.18.1
- bug fixes in
LogNormalFitter
variance estimates - improve convergence of
LogNormalFitter
. We now model the log of sigma internally, but still expose sigma externally. - use the
autograd
lib to help with gradients. - New
LogLogisticFitter
univariate fitter available.
v0.18.0
0.18.0
LogNormalFitter
is a new univariate fitter you can use.WeibullFitter
now correctly returns the confidence intervals (previously returned only NaNs)WeibullFitter.print_summary()
displays p-values associated with its parameters not equal to 1.0 - previously this was (implicitly) comparing against 0, which is trivially always true (the parameters must be greater than 0)ExponentialFitter.print_summary()
displays p-values associated with its parameters not equal to 1.0 - previously this was (implicitly) comparing against 0, which is trivially always true (the parameters must be greater than 0)ExponentialFitter.plot
now displays the cumulative hazard, instead of the survival function. This is to make it easier to compare toWeibullFitter
andLogNormalFitter
- Univariate fitters'
cumulative_hazard_at_times
,hazard_at_times
,survival_function_at_times
return pandas Series now (use to be numpy arrays) - remove
alpha
keyword from all statistical functions. This was never being used. - Gone are astericks and dots in
print_summary
functions that represent signficance thresholds. - In models'
summary
(includingprint_summary
), thelog(p)
term has changed to-log2(p)
. This is known as the s-value. See https://lesslikely.com/statistics/s-values/ - introduce new statistical tests between univariate datasets:
survival_difference_at_fixed_point_in_time_test
,... - new warning message when Cox models detects possible non-unique solutions to maximum likelihood.
- Generally: clean up lifelines exception handling. Ex: catch
LinAlgError: Matrix is singular.
and report back to the user advice.
v0.17.5
0.17.5
- more bugs in
plot_covariate_groups
fixed when using non-numeric strata.