Halo
i'm done to build recommendation using Mllib ALS in apache spark, with output
user | product | rating
1 | 20 | 0.002
1 | 30 | 0.001
1 | 10 | 0.003
2 | 20 | 0.002
2 | 30 | 0.001
2 | 10 | 0.003
but i need to change data structure based on sort by rating, like that :
user | product | rating | number_rangking
1 | 10 | 0.003 | 1
1 | 20 | 0.002 | 2
1 | 30 | 0.001 | 3
2 | 10 | 0.002 | 1
2 | 20 | 0.001 | 2
2 | 30 | 0.003 | 3
how can i do that? maybe any one can give me a clue...
thx