0

我在一个包含文本和类列的 CSV 文件中有大约 11000 行数据。文本是 twitter 消息,它们中的每一个都在 Class 中分配了 True 或 false。我使用这两个命令使用逻辑回归模型来训练和测试这些数据,但 AUC 0.52 的结果并不好。我不太了解一些参数--rate --features--lambda所以有人可以帮助我使用更合适的命令吗?非常感谢!

$ bin/mahout trainLogistic --passes 100 --rate 50 --lambda 0.001 --input twitter.csv --features 10000 --output twitter.model --target Class --categories 2 --predictors Text --types t

$ bin/mahout runlogistic --input twitter.csv --model twitter.model --AUC --confusion

数据文件链接:twitter.csv

4

1 回答 1

0

以下是用于训练模型的参数。

"input" : training data
"output" : path to the file where model will be written.
"target" : dependent variable which is to be predicted
"categories" : number of unique possible values that target can be assigned
"predictors" : list of field names that are to be used to predict target variable
"types" : datatypes for the items in predictor list
"passes" : number of passes over the input data
"features" : size of internal feature vector
"lambda" : amount of co-efficient decay to use
"rate" : initial learning rate

您可以参考Mahout 帖子中的 Logistic 回归了解详细说明。

于 2016-04-25T12:05:01.513 回答