【问题标题】:Using Logistic Regression in Mahout在 Mahout 中使用逻辑回归
【发布时间】:2014-04-22 01:25:37
【问题描述】:

我在一个 CSV 文件中有大约 11000 行数据,其中包含列 Text 和 Class。文本是 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

【问题讨论】:

  • mashout?哈哈。难怪它不起作用,似乎你捣碎了一些东西。 ;-)

标签: hadoop machine-learning regression mahout logistic-regression


【解决方案1】:

这是用于训练模型的参数。

"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

您可以参考Logistic Regression in Mahout 帖子了解详细说明。

【讨论】:

    猜你喜欢
    • 2015-02-21
    • 1970-01-01
    • 2014-02-19
    • 1970-01-01
    • 1970-01-01
    • 2020-01-31
    • 2017-09-01
    • 2012-11-27
    • 1970-01-01
    相关资源
    最近更新 更多