Kaplan-Meier Posted on 2024-01-20 Edited on 2024-01-21 Views: Kapla-Meier法是一种刻画数据的非参数生存函数,直接用概率乘法定理估计生存率,但是不能建立数字模型对多个影响因素进行分析。主要思路:$$S(t_i)=S(t_{i-1})(1-\frac{d_i}{n_i})$$ 代码:查看总体数据的生存曲线123456789fig, ax = plt.subplots(figsize=(10,8)) kmf = KaplanMeierFitter()kmf.fit(data.tenure, # 代表生存时长 event_observed=data.Churn, # 代表事件的终点 )kmf.plot_survival_function(at_risk_counts=True,ax=ax)plt.show() Post author: Gamer Post link: https://gamermmm.github.io/2024/uncategorized/Kaplan-Meier/ Copyright Notice: All articles in this blog are licensed under BY-NC-SA unless stating additionally.