您的位置:首页 > 财经 > 产业 > 决策曲线DCA的绘制

决策曲线DCA的绘制

2024/12/23 4:49:42 来源:https://blog.csdn.net/weixin_73101319/article/details/140914460  浏览:    关键词:决策曲线DCA的绘制

今天被要求画一下决策曲线,用Python试了半天也没画出来,最后参考了资料还是用R语言绘制了出来。

数据的格式

 将四条曲线画在一张表中


library(rmda)
library(readxl)# 读取Excel文件
data <- read_excel("C:/Users/Administrator/Desktop/肺动脉数据1000.xlsx")baseline.model <- decision_curve(y~Qanadli指数 + AD + 血凝块比率+联合,data = data,thresholds = seq(0, .4, by = .01),bootstraps = 10)set.seed(123)# 为每个特征创建决策曲线模型
model_qanadli <- decision_curve(y~Qanadli指数,data = data,thresholds = seq(0, 1, by = .01),bootstraps = 10)model_ad <- decision_curve(y~ AD,data = data,thresholds = seq(0, 1, by = .01),bootstraps = 10)model_coagulation <- decision_curve(y~血凝块比率,data = data,thresholds = seq(0, 1, by = .01),bootstraps = 10)model_combined <- decision_curve(y~联合,data = data,thresholds = seq(0, 1, by = .01),bootstraps = 10)# 绘制四条决策曲线
plot_decision_curve(list(model_qanadli, model_ad, model_coagulation, model_combined),curve.names = c("Qanadli", "AD", "Coagulation", "Combined"),cost.benefit.axis = FALSE,confidence.intervals = FALSE,standardize = FALSE)

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com