首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >R中的xgboost如何计算预测函数的概率?

R中的xgboost如何计算预测函数的概率?
EN

Stack Overflow用户
提问于 2018-08-14 04:29:55
回答 1查看 0关注 0票数 0

需要了解xgboost中使用的方法,来计算xgboost预测函数中分类问题的概率。

EN

回答 1

Stack Overflow用户

发布于 2018-08-14 14:27:20

这是二进制分类的sketch-Code:

library(xgboost)
data(agaricus.train, package='xgboost')
data(agaricus.test, package='xgboost')
train <- agaricus.train
test <- agaricus.test
bst <- xgboost(data = train$data, label = train$label, max.depth = 2, eta = 1, nthread = 2, nround = 2, objective = "binary:logistic")
pred <- predict(bst, test$data)
print(head(pred))
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/-100002133

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档