问题标签 [mahout]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
3 回答
24871 浏览

hadoop - 如何开始 mahout 的开发

从 (http://girlincomputerscience.blogspot.com/2010/11/apache-mahout.html) 安装 mahout 后。如何运行 mahout 算法以及从哪里我可以获得最流行的 mahout 新生简单教程......

提前致谢。

0 投票
1 回答
1737 浏览

vector - 生成序列文件

给定以下格式的数据(tag_uri image_uri image_uri image_uri ...),我需要将它们转换为 Hadoop SequenceFile 格式以供 Mahout 进一步处理(例如集群)

在此之前,我会将输入转换为 csv(或 arff),如下所示

每行描述一个标签。然后将arff文件转换为mahout使用的矢量文件进行进一步处理。我试图跳过 arff 生成部分,而是生成一个 sequenceFile。如果我没记错的话,要将我的数据表示为一个序列文件,我需要以 $tag_uri 作为键存储数据的每一行,然后将 $image_vector 作为值。这样做的正确方法是什么(如果可能,我可以将每一行的 tag_url 包含在某处的序列文件中)吗?

我找到了一些参考资料,但不确定它们是否相关:

  1. 编写序列文件
  2. 为 svd 矩阵分解格式化输入矩阵(我可以以这种形式存储我的矩阵吗?)
  3. RandomAccessSparseVector(考虑到我只列出分配有给定标签的图像而不是一行中的所有图像,是否可以使用这个向量来表示它?)
  4. 序列文件写入
  5. 序列文件说明
0 投票
1 回答
1667 浏览

distance - Mahout Log Likelihood similarity metric behaviour

The problem I'm trying to solve is finding the right similarity metric, rescorer heuristic and filtration level for my data. (I'm using 'filtration level' to mean the amount of ratings that a user or item must have associated with it to make it into the production database).

Setup
I'm using mahout's taste collaborative filtering framework. My data comes in the form of triplets where an item's rating are contained in the set {1,2,3,4,5}. I'm using an itemBased recommender atop a logLikelihood similarity metric. I filter out users who rate fewer than 20 items from the production dataset. RMSE looks good (1.17ish) and there is no data capping going on, but there is an odd behavior that is undesireable and borders on error-like.

Question

First Call -- Generate a 'top items' list with no info from the user. To do this I use, what I call, a Centered Sum:

I use a centered sum instead of average ratings to generate a top items list mainly because I want the number of ratings that an item has received to factor into the ranking.

Second Call -- I ask for 9 similar items to each of the top items returned in the first call. For each top item I asked for similar items for, 7 out of 9 of the similar items returned are the same (as the similar items set returned for the other top items)!

Is it about time to try some rescoring? Maybe multiplying the similarity of two games by (number of co-rated items)/x, where x is tuned (around 50 or something to begin with).

Thanks in advance fellas

0 投票
1 回答
796 浏览

amazon-ec2 - 每次我在 EC2 服务器上运行 Mahout 示例时都会出现管道损坏异常

根据此处此处提供的说明,我已经在 bitnami AMI ami-02fb006b 上安装了 mahout(以及其他几个 ami,否则我不会问这个问题):

我在尝试运行 ./examples/bin/build-reuters.sh 时总是卡住这是命令的输出:

这是一个一致的错误,我在每次尝试安装时都会遇到它。

我该怎么做才能解决这个问题?

0 投票
2 回答
1693 浏览

r - 使用 R 与 SimpleDB 或 BigQuery 或使用 PHP 与 SimpleDB 的建议

我目前正在研究生成产品推荐的系统,例如亚马逊上的产品推荐:“买这个的人也买了这个..”

当前场景:

  • 提取客户端的谷歌分析数据并将其插入数据库。

  • 在客户端的网站上,在加载产品页面时,会调用 API 以获取正在查看的产品的推荐。

  • 当 API 收到产品 ID 作为请求时,它会在数据库中查找并检索(使用关联规则)推荐的产品 ID 并将它们作为响应发送。

  • 这些产品ID的列表将被处理以在客户端获取产品详细信息(图像,价格..)并显示在网站上。

  • 目前我在 AMAZON EC2 上使用 PHP 和 MYSQL 以及 gapi 包和 REST api 存储。

我的问题是: 现在,如果我必须在以下选项中进行选择,那将是实现上述概念的最佳选择。

  • PHP 与 SimpleDB 或 BIGQuery。

  • 带有 BIGQuery 的 R 语言。

  • RHIPE-(R 和 hadoop)与 SimpleDB。

  • Apache Mahout。

请帮忙!

0 投票
1 回答
558 浏览

mahout - Mahout rescorer 实现

我想将两个项目之间的所有 PearsonItemSimilarity 值按它们共享的装饰数除以 50 来加权。

或者换句话说,相应地更新两个项目(例如项目 a 和 b)之间的通用 pearson 相似度 --similarity_new_ab =similarity_ab*numCoRatings_ab/50

  1. 如何使用现有的 mahout 框架获得两个游戏之间的关联数。

  2. 有人可以将我链接到(或说明)rescorer 的示例实现吗?

我这样做的理由如下,

我假设计算的大多数 Pearson 相似性是基于少量(大多数情况下为 1 或 2 个)coratings。这将导致游戏彼此共享 1 的 Pearson 相关性,事实上,如果存在更多相关性,情况可能不会如此。

考虑到这一点,我想将这些“幼稚”的 Pearson 相似性更改为也基于共同评分数量的相似性。

我以为这就是 rescorer 的用途,但我想我错了。

0 投票
1 回答
737 浏览

hadoop - hadoop 是否需要运行 mahout-in-action 示例?

运行 Mahout In Action 示例是否需要 hadoop?我看到有一个随 mahout 提供的 hadoop jar。我一直遇到 build-reuters.sh 的问题,想知道是否需要单独安装 hadoop。谢谢!!

0 投票
1 回答
2347 浏览

clojure - 使用 Clojure 使用 Mahout 进行聚类 (fkmeans)

我正在尝试编写一个简短的脚本来通过 clojure 对我的数据进行聚类(尽管调用 Mahout 类)。我有这种格式的输入数据(这是php 脚本的输出)

然后我使用这个脚本(clojure)将它们写入一个序列文件

基本上它将输入转换为序列文件,格式为

键(文本):$tag_uri 值(VectorWritable):具有数字索引和相应频率的向量(基数 = 文档数)<0:1 1:0 2:0 3:1 4:0 ...>

然后我继续用这个脚本做实际的集群(通过参考这篇文)

但是我得到这样的输出

当 runSequential 设置为 true

我还将 fkmeans 脚本重写为这种形式

但仍然出现与第一个初始版本相同的错误:/

命令行工具运行良好

但是,当我尝试 clusterdumper 时它不会返回分数,即使 --clustering 选项存在于上一个命令中并且 --pointsDir 在这里定义

使用的 Mahout 版本:0.6-snapshot,clojure 1.3.0-snapshot

如果我错过了什么,请告诉我

0 投票
3 回答
3611 浏览

java - Mahout :读取自定义输入文件

我在玩 Mahout,发现 FileDataModel 接受格式为

我有一些格式的数据

在 Mahout 上使用此数据集的最佳/最简单方法是什么?

0 投票
1 回答
451 浏览

java - Mahout Recommender Not Working Properly

I am working on Mahout and found an issue when I tried to change my csv, previously it was giving me proper recommendations.

Example code:

I have just updated the values of my csv and it has stopped giving me suggestion.

CSV that is not giving me any result:

CSV which is giving me result:

Output on console respectively:

Result from 1st Dataset Aug 27, 2011 2:45:06 AM org.slf4j.impl.JCLLoggerAdapter info INFO: Creating FileDataModel for file WriteTest.csv Aug 27, 2011 2:45:06 AM org.slf4j.impl.JCLLoggerAdapter info INFO: Reading file info... Aug 27, 2011 2:45:06 AM org.slf4j.impl.JCLLoggerAdapter info INFO: Readlines: 11 Aug 27, 2011 2:45:06 AM org.slf4j.impl.JCLLoggerAdapter info INFO: Processed 4 users

I was expecting Item no 167 but din't find any recommendation

Output of 2nd dataset: