You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Georgi Stanev <Ge...@holidaycheck.com> on 2011/11/23 15:34:15 UTC

KnnItemBasedRecommender question

________________________________
Hi there,

I have a question about the KnnItemBasedRecommender, precisely about the calculation of the interpolations.
The paper of Robert M. Bell and Yehuda Koren says, that by the calculation of the matrix A there is made an assumption, that all users but u (the current user) have rated all items in the neighborhood. So Ajk = sigma(Rvj * Rvk). The user u is not included in this set.
In the method getInterpolations, Rvj is always multiplied by Ruk. Isn't that wrong?
I mean you have to pass all users that rated all items in the neighborhood and than multiply Rvj with there ratings.
Sorry about my english and I hope you can understan what I mean.

Thanks for any replies and thoughts.
Greetings Georgi

Re: KnnItemBasedRecommender question

Posted by Sean Owen <sr...@gmail.com>.
I don't immediately see the issue; in getInterpolations() you have...

        for (int pi = 0; pi < iSize; pi++) {
          long v = iPrefs.getUserID(pi);
          if (v == userID) {
            continue;
          }

This loops over all users and excludes user u, no?

On Wed, Nov 23, 2011 at 2:34 PM, Georgi Stanev <
Georgi.Stanev@holidaycheck.com> wrote:

>
> ________________________________
> Hi there,
>
> I have a question about the KnnItemBasedRecommender, precisely about the
> calculation of the interpolations.
> The paper of Robert M. Bell and Yehuda Koren says, that by the calculation
> of the matrix A there is made an assumption, that all users but u (the
> current user) have rated all items in the neighborhood. So Ajk = sigma(Rvj
> * Rvk). The user u is not included in this set.
> In the method getInterpolations, Rvj is always multiplied by Ruk. Isn't
> that wrong?
> I mean you have to pass all users that rated all items in the neighborhood
> and than multiply Rvj with there ratings.
> Sorry about my english and I hope you can understan what I mean.
>
> Thanks for any replies and thoughts.
> Greetings Georgi
>

Re: KnnItemBasedRecommender question

Posted by Nkechi Nnadi <nk...@gmail.com>.
I believe the paper used was:
R. M. Bell and Y. Koren, "Scalable Collaborative Filtering with Jointly
Derived Neighborhood Interpolation Weights", *Proc. IEEE International
Conference on Data Mining (ICDM'07)*, 2007.
http://public.research.att.com/~volinsky/netflix/BellKorICDM07.pdf


On Wed, Nov 23, 2011 at 10:16 AM, Sean Owen <sr...@gmail.com> wrote:

> I know Andre Pannison wrote that bit of code -- Andre are you still on the
> list?
>
> Can you supply the paper, maybe I can have an independent look at the
> algorithm vs implementation.
>
> On Wed, Nov 23, 2011 at 2:34 PM, Georgi Stanev <
> Georgi.Stanev@holidaycheck.com> wrote:
>
> >
> > ________________________________
> > Hi there,
> >
> > I have a question about the KnnItemBasedRecommender, precisely about the
> > calculation of the interpolations.
> > The paper of Robert M. Bell and Yehuda Koren says, that by the
> calculation
> > of the matrix A there is made an assumption, that all users but u (the
> > current user) have rated all items in the neighborhood. So Ajk =
> sigma(Rvj
> > * Rvk). The user u is not included in this set.
> > In the method getInterpolations, Rvj is always multiplied by Ruk. Isn't
> > that wrong?
> > I mean you have to pass all users that rated all items in the
> neighborhood
> > and than multiply Rvj with there ratings.
> > Sorry about my english and I hope you can understan what I mean.
> >
> > Thanks for any replies and thoughts.
> > Greetings Georgi
> >
>

Re: KnnItemBasedRecommender question

Posted by Sean Owen <sr...@gmail.com>.
I know Andre Pannison wrote that bit of code -- Andre are you still on the
list?

Can you supply the paper, maybe I can have an independent look at the
algorithm vs implementation.

On Wed, Nov 23, 2011 at 2:34 PM, Georgi Stanev <
Georgi.Stanev@holidaycheck.com> wrote:

>
> ________________________________
> Hi there,
>
> I have a question about the KnnItemBasedRecommender, precisely about the
> calculation of the interpolations.
> The paper of Robert M. Bell and Yehuda Koren says, that by the calculation
> of the matrix A there is made an assumption, that all users but u (the
> current user) have rated all items in the neighborhood. So Ajk = sigma(Rvj
> * Rvk). The user u is not included in this set.
> In the method getInterpolations, Rvj is always multiplied by Ruk. Isn't
> that wrong?
> I mean you have to pass all users that rated all items in the neighborhood
> and than multiply Rvj with there ratings.
> Sorry about my english and I hope you can understan what I mean.
>
> Thanks for any replies and thoughts.
> Greetings Georgi
>

Re: KnnItemBasedRecommender question

Posted by Sean Owen <sr...@gmail.com>.
I don't know this code well -- I suspect you know it better than I, and bet
you have a point. Do you have a suggested patch? Maybe Andre can chime in
to confirm your change.

On Thu, Nov 24, 2011 at 11:46 AM, Georgi Stanev <
Georgi.Stanev@holidaycheck.com> wrote:

> I'm not quite sure how to reply to you, Sean, because something didn't
> worked with the subscription...
> This is correct, what you wrote, but there are two terms in the sum, Rvj
> and Rvk. You have to take into account also the second term. Namely...
>
>    Float pj = dataModel.getPreferenceValue(userID, jitem);
>
> which is Ruk.
>
> Second iPrefs are the preferences for all users, not only those who rated
> item I and I's neighborhood. This shouldn't be correct to.
> Third which A and b is calculated? A, A-dash or Â?
>

Re: KnnItemBasedRecommender question

Posted by Georgi Stanev <Ge...@holidaycheck.com>.
I'm not quite sure how to reply to you, Sean, because something didn't worked with the subscription...
This is correct, what you wrote, but there are two terms in the sum, Rvj and Rvk. You have to take into account also the second term. Namely...

    Float pj = dataModel.getPreferenceValue(userID, jitem);

which is Ruk.

Second iPrefs are the preferences for all users, not only those who rated item I and I's neighborhood. This shouldn't be correct to.
Third which A and b is calculated? A, A-dash or Â?