GBM多项式分布,如何使用predict()获取预测类? [英] GBM multinomial distribution, how to use predict() to get predicted class?

查看:731
本文介绍了GBM多项式分布,如何使用predict()获取预测类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用R中gbm包中的多项式分布.当我使用predict函数时,会得到一系列值:

I am using the multinomial distribution from the gbm package in R. When I use the predict function, I get a series of values:

5.086328 -4.738346 -8.492738 -5.980720 -4.351102 -4.738044 -3.220387 -4.732654

但是我想获得每个班级发生的概率.我如何找回概率?谢谢.

but I want to get the probability of each class occurring. How do I recover the probabilities? Thank You.

推荐答案

看看?predict.gbm,您将看到该函数有一个类型"参数.试用predict(<gbm object>, <new data>, type="response").

Take a look at ?predict.gbm, you'll see that there is a "type" parameter to the function. Try out predict(<gbm object>, <new data>, type="response").

这篇关于GBM多项式分布,如何使用predict()获取预测类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆