r - mlr3 - 预测的置信区间
问题描述
在调整学习器并使用它之后,我们可以使用它通过命令行进行预测
predict(Learner, newdata, predict_type="response")
但是,我们如何计算预测的置信区间?
task <- TaskRegr$new("data", data, "y")
learner <- lrn("regr.xgboost")
preprocess <- po("scale", param_vals = list(center = TRUE, scale = TRUE))
pp <- preprocess %>>% learner
gg<- GraphLearner$new(pp)
gg$train(task)
predict(gg, newdata = pred, predict_type="reponse")
解决方案
并非所有学习者都支持预测错误,xgboost 就是其中之一。您必须使用不同的学习器来获得错误估计。
推荐阅读
- google-apps-script - 在 Google AppScript 中使用 Web3?
- postgresql - Spring Boot App 无法使用来自 Kubernetes 机密的凭据访问 PostgreSQL
- r - 文本挖掘时单词被截断
- r - GLMM:glmer()中的自由度校正和随机残差方差
- javascript - 使用下拉列表中的属性值过滤对象数组 - Angular 模板
- android - 如何在 react native 中制作聊天框?
- javascript - 处理动态地图内容(标记)的正确方法
- javascript - 如何从两个元素中获取文本,将它们转换为数字并将它们添加到柏树中?
- python - 调试python代码(VSCODE)时终端出错
- hyperlink - 用于智能卡的 Java Card 技术:架构和程序员指南,陈志群