如何使用Apache星火ALS有限的评分值(交替最小二乘)算法 [英] How to use Apache Spark ALS (alternating-least-squares) algorithm with limited Rating values

查看:137
本文介绍了如何使用Apache星火ALS有限的评分值(交替最小二乘)算法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用ALS,但目前我的数据是有限的约买哪些用户信息。所以我想从Apache的星火填补ALS与等级等于1(一),当用户X购买项目Y(我该算法提供的只有这样的信息)。

I am trying to use ALS, but currently my data is limited to information about what user bought. So I was trying to fill ALS from Apache Spark with Ratings equal 1 (one) when user X bought item Y (and only such information I provided to that algorithm).

我是想学习它(划分数据来训练/测试/验证)或试图只是为了学习上的所有数据,但最后我得到prediction与任何一对用户项目(极其相似值分化像0,86001和0,86002)逗号后的第5或第6位的值。

I was trying to learn it (divided data to train/test/validation) or was trying just to learn on all data but at the end I was getting prediction with extremely similar values for any pair user-item (values differentiated on 5th or 6th place after comma like 0,86001 and 0,86002).

我在想这也许是因为我只能提供评级等于1,因此不ALS不能在这种极端情况下使用?

I was thinking about that and maybe it is because I can provide only rating equal 1 so does ALS cannot be used in such extreme situation?

是否与收视率的把戏,所以我可以用它来解决这样的问题(我只有信息的关于什么是买 - 后,我会得到更多的数据,但在那一刻我都使用某种协同过滤,直到我将获得更多的数据 - 换句话说,我需要显示用户某种启动页面上推荐我选择了ALS启动页面,但也许我用别的东西,究竟是什么)

Is there any trick with ratings so I could use to fix such problem (I have only information's about what was bought - later I am going to get more data, but at a moment I have to use some kind of collaborative filtering until I will acquire more data - in other words I need to show user some kind of recommendation on startup page I choose ALS for startup page but maybe I use something else, what exactly)?

Ofcourse我喜欢变化反复,λ,等级的参数。

Ofcourse I was changing parameters like iterations, lambda, rank.

推荐答案

在这种情况下,关键是你必须使用 trainImplicit ,而忽略评级的价值。否则,你要求它predict收视率,每个人都费率1.正确的答案必然是1世界,让所有的答案都是相似的。

In this case, the key is that you must use trainImplicit, which ignores Rating's value. Otherwise you're asking it to predict ratings in a world where everyone rates everything 1. The right answer is invariably 1, so all your answers are similar.

这篇关于如何使用Apache星火ALS有限的评分值(交替最小二乘)算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆