Questions tagged [lifelines]

lifelines is an implementation of survival analysis in Python. Use this tag for questions regarding lifelines.

lifelines is a python package specifically for Survival Analysis.

What is Survival Analytics?

Survival analysis is the statistics of censored time to event data, to which standard regression and classification techniques generally do not apply, due to the uncertain group memberships of the observations.

Survival analysis is generally defined as a set of methods for analyzing data where the outcome variable is the time until the occurrence of an event of interest. The event can be death, occurrence of a disease, marriage, divorce, etc. The time to event or survival time can be measured in days, weeks, years, etc.

For example, if the event of interest is heart attack, then the survival time can be the time in years until a person develops a heart attack.

lifelines package offers following:

  1. built on top of Pandas

  2. internal plotting methods

  3. simple and intuitive API

  4. only does survival analysis (No unnecessary features or second-class implementations)

For More Details Visit : lifelines Docs

63 questions
-1
votes
0 answers

How to make all plots the same size

I have KM plots using Lifelines that I want to fit 2 per portrait A4 sheet (there will be more than 3). Even though the figsize is the same they are all randomly different sizes and placing. 1st has expanded vertically, is nice and tight to the…
Peter Hill
  • 43
  • 1
  • 6
-1
votes
1 answer

how to change color of censor tick and truncate KM curve if number at risk is < 5 using lifelines library?

Is it possible to change the colour of the censor tag in lifelines? The code-chunk that I used was kmf.plot_survival_function( show_censors=True, censor_styles={'ms': 5, 'marker': '|'}, at_risk_counts=True, ci_show=False ) And how…
-1
votes
1 answer

How to better develop function for automating Kaplan Meier survival function estimation?

I'm hoping to get some useful feedback on how to improve a quite lengthy function I wrote to make Kaplan Meier survival function plots quick and easy to plot for all features in a dataframe. I've only been coding for about a year and a half now and…
1 2 3 4
5