简体   繁体   English

如何预测cox回归的brier得分?

[英]How to predict the brier score for a cox regression?

I am using the mlr package to do machine learning in R. I am using a the cvcoxboost algorithmn on a dataset and would like to calculate the brier score of the output. 我正在使用mlr包在R中进行机器学习。我在数据集上使用了cvcoxboost algorithmn,并希望计算输出的brier得分。

This should work, since listMeasures(cvcoxboost.tsk) also lists the measurement ibrier . 这应该起作用,因为listMeasures(cvcoxboost.tsk)也列出了测量ibrier The entire code looks like this: 整个代码如下所示:

cvcoxboost.lrn = makeLearner("surv.cv.CoxBoost") 
cvcoxboost.tsk = makeSurvTask(data = data, target = c("time", "event"))
cvcoxboost.mod = train(cvcoxboost.lrn, cvcoxboost.tsk, subset = data.train) 
cvcoxboost.tsk.pred = predict(cvcoxboost.mod, task = cvcoxboost.tsk, subset = data.test)

listMeasures(cvcoxboost.tsk) # "iauc.uno" "featperc"    "ibrier"      "timeboth"  "timetrain"   "timepredict" "cindex.uno"  "cindex"  

performance(cvcoxboost.tsk.pred, measures = mlr::cindex)
performance(cvcoxboost.tsk.pred, measures = cindex.uno, model = cvcoxboost.mod, task = cvcoxboost.tsk)
performance(cvcoxboost.tsk.pred, measures = mlr::ibrier, model = cvcoxboost.mod, task = cvcoxboost.tsk)

...and I receive the error No method for evaluating predicted probabilities from objects in class: CoxBoost . ...并且我收到错误No method for evaluating predicted probabilities from objects in class: CoxBoost

ibrier only works for certain learners that are supported by the pec package like randomForestSRC or cox. ibrier仅适用于受pec软件包支持的某些学习者,例如randomForestSRC或cox。 This is currently not well documented enough, but you can look into the pec package to see which models are supported. 目前尚无足够的文档记录,但是您可以查看一下pec软件包,以了解支持哪些模型。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM