Google Prediction API始终返回1.0或0.0的分数

时间:2015-04-01 14:57:29

标签: google-api-ruby-client google-prediction

我正在使用google-api-ruby-client的insert函数并传入一系列trainingInstances。

当我打电话预测时,我曾经得到像0.653264和0.346736(使用两个输出类别)的分数。

在进行一些重构后,我现在总是得到1.0和0.0的分数,并且两者之间没有概率。

预测精度(由我测量)仍然接近状态函数给出的准确度,因此看起来训练模型正在工作。我只是想知道为什么我没有得到1到0之间的分数,因为我想在我的应用程序中使用它们。

非常感谢任何见解。

以下是我正在使用的训练数据示例:

"Completed Registration",32.54,2,0,1,12
"Completed Registration",27.05,2,0,1,7
"Completed Registration",27.29,1,0,3,7
"Completed Registration",24.15,1,0,1,6
"Completed Registration",26.36,2,0,1,6
"Completed Registration",27.0,3,1,3,5
"Completed Registration",22.15,3,1,3,5
"Completed Registration",27.9,2,1,1,1
"Completed Registration",21.21,2,0,3,0
"Completed Registration",24.36,3,0,3,0
"Completed Registration",53.52,2,1,3,0
"Completed Registration",24.15,8,0,3,-6
"Cancelled Registration",,2,0,3,76
"Cancelled Registration",,2,0,3,76
"Cancelled Registration",,3,1,3,69
"Cancelled Registration",38.27,5,0,1,63
"Cancelled Registration",37.25,2,0,3,50
"Cancelled Registration",35.59,5,1,3,49
"Cancelled Registration",19.52,2,0,3,30
"Cancelled Registration",26.7,2,0,3,28

我在Google API资源管理器上运行测试,并将培训数据上传到CSV文件中。

我首次上传的数据(几周前)会产生一系列分数。但是今天上传的完全相同的数据只得到1或0的分数。

这可能是字符编码问题吗?

1 个答案:

答案 0 :(得分:0)

如果其他人有同样的问题我会在这里发布答案。事实证明,API内部可以根据训练数据使用不同的分类器。看起来差异是由API的更改造成的,而不是由我的重构造成的。

以下是来自Google https://groups.google.com/forum/#!topic/prediction-api-discuss/7QPhONKhZjc

的某人的解释