unit8co / darts

A python library for user-friendly forecasting and anomaly detection on time series.
https://unit8co.github.io/darts/
Apache License 2.0
7.56k stars 829 forks source link

Add Support for Survival Analysis #2288

Open sarim-zafar opened 3 months ago

sarim-zafar commented 3 months ago

Is your feature request related to a current problem? Please describe. Currently, I am working on a project that involves survival analysis/regression models with support for censored data. I am utilizing the Darts library by Unit8co for time series forecasting tasks, and I am in need of survival analysis capabilities similar to what is provided by XGBoost's aft_survival_analysis module.

Describe proposed solution I propose adding support for survival analysis/regression models with censored data to the Darts library. This would involve implementing algorithms and functionalities akin to the aft_survival_analysis module in XGBoost, allowing users to build predictive models that account for censoring in time-to-event data.

Describe potential alternatives One potential alternative is to utilize other libraries or frameworks that already support survival analysis with censored data, such as scikit-survival or lifelines. However, integrating such functionalities directly into Darts would streamline the workflow for users who are already utilizing the library for time series analysis.

Additional context Survival analysis is a crucial tool in various fields, including healthcare, finance, and reliability engineering, among others. By adding support for survival analysis models with censored data to Darts, the library would become even more versatile and applicable to a wider range of time series forecasting tasks.

madtoinou commented 3 months ago

Hi @sarim-zafar,

Thank you for the feature request, could you please elaborate how these survival analysis models would integrate with the TimeSeries data-structure or forecasting models, for example, are you using the same datasets for both?

My first impression is that these new models are slightly beyond the scope of the library as they are not directly related to time-series forecasting.