Skip to content

Instantly share code, notes, and snippets.

@a-agmon
Last active May 3, 2020 17:29
Show Gist options
  • Save a-agmon/ab4f1132aa1debe50ce9d8e78ae19478 to your computer and use it in GitHub Desktop.
Save a-agmon/ab4f1132aa1debe50ce9d8e78ae19478 to your computer and use it in GitHub Desktop.
from lifelines import CoxPHFitter
df_reg = df.loc[:,['event','days_with_bad_req','req_day','bad_req_days_rate']]
cp = CoxPHFitter()
cp.fit(df_reg, duration_col='days_with_bad_req', event_col='event')
cp.print_summary()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment