【发布时间】:2015-12-25 09:20:34
【问题描述】:
我正在使用TextClassificationEngine。以https://docs.prediction.io/demo/textclassification/ 为例,有两种算法(朴素贝叶斯和逻辑回归)用于文本分类。朴素贝叶斯算法工作正常,但是当我使用逻辑回归时,它给出了一些错误。
{
"id": "default",
"description": "Default settings",
"engineFactory": "org.template.textclassification.TextClassificationEngine",
"datasource": {
"params": {
"appName": "Logistic"
}
},
"preparator": {
"params": {
"nGram": 2
}
},
"algorithms": [
{
"name": "regParam",
"params": {
"regParam":2,5
}
}
]
}
以上代码是现场给出的,由于数组,它在regParam有一些错误。谁能解释一下engine.json中的regParam是什么,逻辑回归的最终engine.json是什么?
【问题讨论】:
-
这个错误是因为你有一个带逗号的
"regParam":2,5,而不是带句点的"regParam":2.5。 @EmergentOrder 解释了它是如何使用的
标签: logistic-regression predictionio