Lifelines
Sample
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)
Acknowledgments
Daiphys is a professional services company in 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!
Daiphys Technologies LLC - https://www.daiphys.com/