mlr 中的特征选择使用 univariate.model.score 过滤审查数据
Feature selection in mlr using univariate.model.score filter on censored data
我正在尝试使用 mlr 和 univariate.model.score 过滤器在 R 中执行特征选择。在文档中它说 surv.rpart 是这个过滤器的默认学习者。我的数据集包含经过审查的生存数据,我想使用不同的学习器,例如 surv.coxph,但我对如何执行此操作感到困惑。换句话说,我希望 univariate.model.score 过滤器使用 cindex 和 Cox 模型创建其分数。
我可以使用 makeFilterWrapper 实现吗?例如
combo.task <- makeSurvTask(data = combo_baseline, target = c("timeToEvent", "status"))
cox.lrn <- makeLearner(cl="surv.coxph", predict.type="response")
inner = makeResampleDesc("CV", iters=5)
lrn = makeFilterWrapper(learner = cox.lrn, fw.method="univariate.model.score", fw.abs=10)
res = resample(learner = lrn, task = combo.task, resampling=inner, models=TRUE)
res$aggr
我无法共享数据,所以我没有提供任何数据,但我希望有人能告诉我如何正确使用代码。谢谢
我通过阅读mlr代码找到了答案。过滤器 "univariate.model.score" 接受一个参数 perf.learner,它允许您指定用于评估过滤器性能的学习器。例如:
combo.task <- makeSurvTask(data = combo_baseline, target = c("timeToEvent", "status"))
cox.lrn <- makeLearner(cl="surv.coxph", predict.type="response")
inner = makeResampleDesc("CV", iters=5)
lrn = makeFilterWrapper(learner = cox.lrn, fw.method="univariate.model.score", fw.abs=10, perf.learner=cox.lrn)
res = resample(learner = lrn, task = combo.task, resampling=inner, models=TRUE)
它还接受参数 perf.measure、性能度量和 perf.resampling、重采样策略。
我正在尝试使用 mlr 和 univariate.model.score 过滤器在 R 中执行特征选择。在文档中它说 surv.rpart 是这个过滤器的默认学习者。我的数据集包含经过审查的生存数据,我想使用不同的学习器,例如 surv.coxph,但我对如何执行此操作感到困惑。换句话说,我希望 univariate.model.score 过滤器使用 cindex 和 Cox 模型创建其分数。
我可以使用 makeFilterWrapper 实现吗?例如
combo.task <- makeSurvTask(data = combo_baseline, target = c("timeToEvent", "status"))
cox.lrn <- makeLearner(cl="surv.coxph", predict.type="response")
inner = makeResampleDesc("CV", iters=5)
lrn = makeFilterWrapper(learner = cox.lrn, fw.method="univariate.model.score", fw.abs=10)
res = resample(learner = lrn, task = combo.task, resampling=inner, models=TRUE)
res$aggr
我无法共享数据,所以我没有提供任何数据,但我希望有人能告诉我如何正确使用代码。谢谢
我通过阅读mlr代码找到了答案。过滤器 "univariate.model.score" 接受一个参数 perf.learner,它允许您指定用于评估过滤器性能的学习器。例如:
combo.task <- makeSurvTask(data = combo_baseline, target = c("timeToEvent", "status"))
cox.lrn <- makeLearner(cl="surv.coxph", predict.type="response")
inner = makeResampleDesc("CV", iters=5)
lrn = makeFilterWrapper(learner = cox.lrn, fw.method="univariate.model.score", fw.abs=10, perf.learner=cox.lrn)
res = resample(learner = lrn, task = combo.task, resampling=inner, models=TRUE)
它还接受参数 perf.measure、性能度量和 perf.resampling、重采样策略。