Lifelines

import lifelines
data = pd.read_csv('sample.csv')
duration = 'DUR'
event = 'EVT'
formula = 'EXP1 + EXP2 + EXP3'
model = lifelines.CoxPHFitter(baseline_estimation_method='breslow')
model.fit(data, duration_col=duration, event_col=event, formula=formula, fit_options={'step_size':0.001}, show_progress=True)
model.print_summary(decimals=5)

Daiphys is a professional-service company for research and development of leading-edge technologies in science and engineering.
Get started accelerating your business through our deep expertise in R&D with AI, quantum computing, and space development; please get in touch with Daiphys today!

Name*


Email*


Message*




* Indicates required field

Daiphys Technologies LLC - https://www.daiphys.com/

  • Last modified: 2023/04/07 00:52
  • by Daiphys