Cox 回归 python
Cox regression python
Python有没有生存分析的包?具体来说,我有兴趣执行 Cox 回归?
我知道这个example but it's in R. Could we just interface Python with R (using, for example, rpy2)?
Python 中的生命线包提供生存分析,包括 Cox 比例风险拟合器:https://lifelines.readthedocs.io/en/latest/
我只想提供截至 2020 年 7 月更新的答案:
- 喜欢 ilse mentioned, lifelines is a great package for all things survival analysis. It plays very nicely with
pandas
and has some great visualization tools 开箱即用。它正在不断发展和更新。此外,它的文档非常详尽。我什至会推荐阅读它作为研究一般生存分析的起点。
- scikit-surv is another option. While it lacks some of lifelines's features, its strong suit is that it is based on
scikit-learn
, which makes it very easy to couple with other building blocks in your pipeline. Moreover, it includes implementations of ML algorithms for survival, such as Random Survival Forests and SSVMs.
- 最后,我们有 PySurvival. I have no experience with this framework, but it looks like it has quite a few algorithms as well. It is built on top PyTorch,等等。
再添加一个库到@arturo 的列表中:
- PyCox:建立在 PyTorch 之上,并提供了一些基于现代深度学习的生存预测算法。
Python有没有生存分析的包?具体来说,我有兴趣执行 Cox 回归?
我知道这个example but it's in R. Could we just interface Python with R (using, for example, rpy2)?
Python 中的生命线包提供生存分析,包括 Cox 比例风险拟合器:https://lifelines.readthedocs.io/en/latest/
我只想提供截至 2020 年 7 月更新的答案:
- 喜欢 ilse mentioned, lifelines is a great package for all things survival analysis. It plays very nicely with
pandas
and has some great visualization tools 开箱即用。它正在不断发展和更新。此外,它的文档非常详尽。我什至会推荐阅读它作为研究一般生存分析的起点。 - scikit-surv is another option. While it lacks some of lifelines's features, its strong suit is that it is based on
scikit-learn
, which makes it very easy to couple with other building blocks in your pipeline. Moreover, it includes implementations of ML algorithms for survival, such as Random Survival Forests and SSVMs. - 最后,我们有 PySurvival. I have no experience with this framework, but it looks like it has quite a few algorithms as well. It is built on top PyTorch,等等。
再添加一个库到@arturo 的列表中:
- PyCox:建立在 PyTorch 之上,并提供了一些基于现代深度学习的生存预测算法。