无法在 mahout 中运行贝叶斯分类器的 20newsgroups 示例
我正在尝试运行 this 页面中提到的 20newsgroups 示例。当我使用这段代码生成输入数据集时
$> $MAHOUT_HOME/bin/mahout org.apache.mahout.classifier.bayes.PrepareTwentyNewsgroups \ -p 示例/bin/work/20news-bydate/20news-bydate-train \ -o 示例/bin/work/20news-bydate/bayes-train-input \ -a org.apache.mahout.vectorizer.DefaultAnalyzer \ -c UTF-8
我所能得到的只是一条警告,指出
在类路径上找不到 org.apache.mahout.classifier.bayes.PrepareTwentyNewsgroups.props,将仅使用命令行参数
这是 mahout 本身的错误吗?我该如何修复它?
I am trying to run the 20newsgroups example as mentioned in this page. When I generate input data set using this piece of code
$> $MAHOUT_HOME/bin/mahout org.apache.mahout.classifier.bayes.PrepareTwentyNewsgroups \
-p examples/bin/work/20news-bydate/20news-bydate-train \
-o examples/bin/work/20news-bydate/bayes-train-input \
-a org.apache.mahout.vectorizer.DefaultAnalyzer \
-c UTF-8
all I could get is a warning that states that
No org.apache.mahout.classifier.bayes.PrepareTwentyNewsgroups.props found on classpath, will use command-line arguments only
Is it a bug in mahout itself? How do I fix it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我能够做到。实际上目录 example/bin/work/20news-bydate/bayes-train-input 已经创建,但即使我刷新,我的文件资源管理器也没有立即显示它。后来当我从终端执行 ls 时,我能够看到创建的文件夹!
I was able to do it. Actually the directory examples/bin/work/20news-bydate/bayes-train-input has been created, but my file explorer didn't show it instantly even though I refreshed. Later when I did an ls from the terminal, I was able to see the folders created!