[英]using caret for survival analysis (random survival forest)
Is there a way to use caret
for Survival Analysis. 有没有办法使用
caret
进行生存分析。 I really like how easy to use it is. 我真的很喜欢它的易用性。 I tried fitting a random survival forest using the
party
package, which is on caret's list. 我尝试使用
party
包来安装随机生存林,这是在插入符号列表中。
This works: 这有效:
library(survival)
library(caret)
library(party)
fitcforest <- cforest(Surv(futime, death) ~ sex+age, data=flchain,
controls = cforest_classical(ntree = 1000))
but using caret
I get an error: 但是使用
caret
我收到错误:
fitControl <- trainControl(## 10-fold CV
method = "repeatedcv",
number = 10,
repeats = 2,
)
cforestfit <- train(Surv(futime, death) ~ sex+age,data=flchain, method="cforest",trControl = fitControl)
I get this error: 我收到此错误:
Error: nrow(x) == length(y) is not TRUE
Is there a way to make these Surv
object work with caret? 有没有办法让这些
Surv
对象与插入符号一起使用? Can I use other survival analysis oriented packages with caret? 我可以使用其他以生存分析为导向的包装吗?
thanks 谢谢
Not yet. 还没。 That is one of two major updates that should be coming soon (the other expands pre-processing).
这是即将推出的两个主要更新之一(另一个扩展预处理)。
Contact me offline if you are interested in helping the development and/or testing of those features. 如果您有兴趣帮助开发和/或测试这些功能,请离线与我联系。
Thanks, 谢谢,
Max 马克斯
I have found no way to train survival models with caret. 我发现无法用插入符号训练生存模型。 As an alternative, the mlr framework (1) has a set of survival learners (2).
作为替代方案,mlr框架(1)具有一组生存学习者(2)。 I have found mlr to be extremely user-friendly and useful.
我发现mlr非常人性化且有用。
There is an increasing number of packages in R that model survival data, examples; R中存在越来越多的模型生存数据,例如;
For lasso and elastic nets: BioSpear. 套索和弹性网:BioSpear。
For random forest: randomForestSRC. 对于随机森林:randomForestSRC。
Best, Loic 最好的,Loic
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.