1

I'm using the ALS algorithm (implicitPrefs = True) in Spark 2.1.0 for collaborative filtering.

I am wondering if it is possible to aggregate the prediction scores. Lets say for a User1 there are the following predictions:

  • Item a: 0.4
  • Item b: 0.2
  • Item c: 0.1
  • Item d: 0.5

In my case items belong to several groups. Lets say Item a and b belong to Group1 and Item c and d to Group 2. Can I now aggregate the predictions? For example by summing them up in order to get the predictions:

  • Group1: 0.4 + 0.2 = 0.6
  • Group2: 0.5 + 0.1 = 0.6

P.S. Fitting the model on Groups is not wanted, because the correlation between groups and items is not constant. Therefore I don't want to refit the model every time the correlation changes. I can't figure out of if the aggregation of predictions is mathematical nonsense or not and I am happy for any help.

jmrth
  • 11
  • 2
  • if you are using spark-ml, I imagine that the "group" information should be attached to your DF, thus you can always group by user, group and sum – eliasah Jan 04 '19 at 13:52
  • anyhow, I'm still not sure why you'd want to do this. – eliasah Jan 04 '19 at 13:54
  • Hey thanks for you answer but I am not asking for how I can sup up my values. I'd rather want to know if its mathematically okay to aggregate the prediction values which I get from the collaborative filtering. – jmrth Jan 04 '19 at 15:30

0 Answers0