Skip to content

Releases: CamDavidsonPilon/lifelines

v0.25.7

09 Dec 21:13
deceff9
Compare
Choose a tag to compare

0.25.7 - 2020-12-09

API Changes
  • Adding cumulative_hazard_at_times to NelsonAalenFitter
Bug fixes
  • Fixed error in CoxPHFitter when entry time == event time.
  • Fixed formulas in AFT interval censoring regression.
  • Fixed concordance_index_ when no events observed
  • Fixed label being overwritten in ParametricUnivariate models

v0.25.6

26 Oct 23:27
b366e42
Compare
Choose a tag to compare

0.25.6 - 2020-10-26
New features
Parametric Cox models can now handle left and interval censoring datasets.
Bug fixes
"improved" the output of add_at_risk_counts by removing a call to plt.tight_layout() - this works better when you are calling add_at_risk_counts on multiple axes, but it is recommended you call plt.tight_layout() at the very end of your script.
Fix bug in KaplanMeierFitter's interval censoring where max(lower bound) < min(upper bound).

v0.25.5

25 Sep 21:46
519bd3a
Compare
Choose a tag to compare

0.25.5 - 2020-09-23

API Changes
  • check_assumptions now returns a list of list of axes that can be manipulated
Bug fixes
  • fixed error when using plot_partial_effects with categorical data in AFT models
  • improved warning when Hessian matrix contains NaNs.
  • fixed performance regression in interval censoring fitting in parametric models
  • weights wasn't being applied properly in NPMLE

v0.25.4

26 Aug 19:44
2597e63
Compare
Choose a tag to compare

0.25.4 - 2020-08-26

New features
  • New baseline estimator for Cox models: piecewise
  • Performance improvements for parametric models' log_likelihood_ratio_test() and print_summary()
  • Better step-size defaults for Cox model -> more robust convergence.
Bug fixes
  • fix check_assumptions when using formulas.

v0.25.3

24 Aug 23:16
5f68026
Compare
Choose a tag to compare

0.25.3 - 2020-08-24

New features
  • survival_difference_at_fixed_point_in_time_test now accepts fitters instead of raw data, meaning that you can use this function on left, right or interval censored data.
API Changes
  • See note on survival_difference_at_fixed_point_in_time_test above.
Bug fixes
  • fix StatisticalResult printing in notebooks
  • fix Python error when calling plot_covariate_groups
  • fix dtype mismatches in plot_partial_effects_on_outcome.

v0.25.2

09 Aug 14:46
91eb8f4
Compare
Choose a tag to compare

0.25.2 - 2020-08-08

New features
  • Spline CoxPHFitter can now use strata.
API Changes
  • a small parameterization change of the spline CoxPHFitter. The linear term in the spline part was moved to a new Intercept term in the beta_.
  • n_baseline_knots in the spline CoxPHFitter now refers to all knots, and not just interior knots (this was confusing to me, the author.). So add 2 to n_baseline_knots to recover the identical model as previously.
Bug fixes
  • fix splines CoxPHFitter with when predict_hazard was called.
  • fix some exception imports I missed.
  • fix log-likelihood p-value in splines CoxPHFitter

v0.25.1

01 Aug 16:26
f4688ed
Compare
Choose a tag to compare

0.25.1 - 2020-08-01

Bug fixes
  • ok actually ship the out-of-sample calibration code
  • fix labels=False in add_at_risk_counts
  • all for specific rows to be shown in add_at_risk_counts
  • put patsy as a proper dependency.
  • suppress some Pandas 1.1 warnings.

v0.25.0

27 Jul 17:12
cae4955
Compare
Choose a tag to compare

0.25.0 - 2020-07-27

New features
  • Formulas! lifelines now supports R-like formulas in regression models. See docs here.
  • plot_covariate_group now can plot other y-values like hazards and cumulative hazards (default: survival function).
  • CoxPHFitter now accepts late entries via entry_col.
  • calibration.survival_probability_calibration now works with out-of-sample data.
  • print_summary now accepts a column argument to filter down the displayed values. This helps with clutter in notebooks, latex, or on the terminal.
  • add_at_risk_counts now follows the cool new KMunicate suggestions
API Changes
  • With the introduction of formulas, all models can be using formulas under the hood.
    • For both custom regression models or non-AFT regression models, this means that you no longer need to add a constant column to your DataFrame (instead add a 1 as a formula string in the regressors dict). You may also need to remove the T and E columns from regressors. I've updated the models in the \examples folder with examples of this new model building.
  • Unfortunately, if using formulas, your model will not be able to be pickled. This is a problem with an upstream library, and I hope to have it resolved in the near future.
  • plot_covariate_groups has been deprecated in favour of plot_partial_effects_on_outcome.
  • The baseline in plot_covariate_groups has changed from the mean observation (including dummy-encoded categorical variables) to median for ordinal (including continuous) and mode for categorical.
  • Previously, lifelines used the label "_intercept" to when it added a constant column in regressions. To align with Patsy, we are now using "Intercept".
  • In AFT models, ancillary_df kwarg has been renamed to ancillary. This reflects the more general use of the kwarg (not always a DataFrame, but could be a boolean or string now, too).
  • Some column names in datasets shipped with lifelines have changed.
  • The never used "lifelines.metrics" is deleted.
  • With the introduction of formulas, plot_covariate_groups (now called plot_partial_effects_on_outcome) behaves differently for transformed variables. Users no longer need to add "derivatives" features, and encoding is done implicitly. See docs here.
  • all exceptions and warnings have moved to lifelines.exceptions
Bug fixes
  • The p-value of the log-likelihood ratio test for the CoxPHFitter with splines was returning the wrong result because the degrees of freedom was incorrect.
  • better print_summary logic in IDEs and Jupyter exports. Previously it should not be displayed.
  • p-values have been corrected in the SplineFitter. Previously, the "null hypothesis" was no coefficient=0, but coefficient=0.01. This is now set to the former.
  • fixed NaN bug in survival_table_from_events with intervals when no events would occur in a interval.

v0.24.16

09 Jul 20:06
0fec0aa
Compare
Choose a tag to compare

0.24.16 - 2020-07-09

New features
  • improved algorithm choice for large Dataframes for Cox models. Should see a significant performance boost.
Bug fixes
  • fixed utils.median_survival_time not accepting Pandas Series.

v0.24.15

07 Jul 18:44
88a37ed
Compare
Choose a tag to compare

0.24.15 - 2020-07-07

Bug fixes
  • fixed an edge case in KaplanMeierFitter where a really late entry would occur after all other population had died.
  • fixed plot in BreslowFlemingtonHarrisFitter
  • fixed bug where using conditional_after and times in CoxPHFitter("spline") prediction methods would be ignored.