【发布时间】:2017-06-12 09:20:36
【问题描述】:
我正在尝试使用“surv.randomForestSRC”作为 R 中机器学习的学习器。 我的代码和结果如下。 “newHCC”是多个数值参数结果的HCC患者生存数据。
> newHCC$status = (newHCC$status == 1)
> surv.task = makeSurvTask(data = newHCC, target = c("time", "status"))
> surv.task
Supervised task: newHCC
Type: surv
Target: time,status
Events: 61
Observations: 127
Features:
numerics factors ordered
30 0 0
Missings: FALSE
Has weights: FALSE
Has blocking: FALSE
> lrn = makeLearner("surv.randomForestSRC")
> rdesc = makeResampleDesc(method = "RepCV", folds=10, reps=10)
> r = resample(learner = lrn, task = surv.task, resampling = rdesc)
[Resample] repeated cross-validation iter 1: cindex.test.mean=0.485
[Resample] repeated cross-validation iter 2: cindex.test.mean=0.556
[Resample] repeated cross-validation iter 3: cindex.test.mean=0.825
[Resample] repeated cross-validation iter 4: cindex.test.mean=0.81
...
[Resample] repeated cross-validation iter 100: cindex.test.mean=0.683
[Resample] Aggr. Result: cindex.test.mean=0.688
我有几个问题。
- 如何查看使用的ntree、mtry等参数?
- 有什么好办法调优吗?
- 我如何查看预测的个人风险,例如我们在使用 randomForestSRC 包的
predicted
时可以看到的内容?
非常感谢。
【问题讨论】:
-
需要:minimal reproducible example 并定义“调整”和“观察预测的个人风险”的含义。
-
抱歉我的英语不好。我的意思是“调整”以搜索 ntree、mtry、节点大小等以获得更好的结果(更低的错误)。对于预测值,我正在考虑 Rdocumentation (rdocumentation.org/packages/randomForestSRC/versions/2.4.1/…) 中显示的预测值。
标签: machine-learning random-forest survival-analysis