如何预测 cox 回归的 brier 分数?
How to predict the brier score for a cox regression?
我在数据集上使用 mlr package to do machine learning in R. I am using a the cvcoxboost 算法,想计算输出的 brier 分数。
这应该可行,因为 listMeasures(cvcoxboost.tsk)
还列出了测量值 ibrier
。整个代码如下所示:
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)
...我收到错误 No method for evaluating predicted probabilities from objects in class: CoxBoost
。
ibrier 仅适用于 pec 包支持的某些学习器,如 randomForestSRC 或 cox。目前还没有足够的文档记录,但您可以查看 pec 包以了解支持哪些模型。
我在数据集上使用 mlr package to do machine learning in R. I am using a the cvcoxboost 算法,想计算输出的 brier 分数。
这应该可行,因为 listMeasures(cvcoxboost.tsk)
还列出了测量值 ibrier
。整个代码如下所示:
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)
...我收到错误 No method for evaluating predicted probabilities from objects in class: CoxBoost
。
ibrier 仅适用于 pec 包支持的某些学习器,如 randomForestSRC 或 cox。目前还没有足够的文档记录,但您可以查看 pec 包以了解支持哪些模型。