Re: [MLLIB] RankingMetrics.precisionAt

2016-12-06 Thread Maciej Szymkiewicz
This sounds much better. Follow up question is if we should provide MAP@k, which I believe is wider used metric. On 12/06/2016 09:52 PM, Sean Owen wrote: > As I understand, this might best be called "mean precision@k", not > "mean average precision, up to k". > > On Tue, Dec 6, 2016 at 9:43 PM M

Re: [MLLIB] RankingMetrics.precisionAt

2016-12-06 Thread Sean Owen
As I understand, this might best be called "mean precision@k", not "mean average precision, up to k". On Tue, Dec 6, 2016 at 9:43 PM Maciej Szymkiewicz wrote: > Thank you Sean. > > Maybe I am just confused about the language. When I read that it returns "the > average precision at the first k ra

Re: [MLLIB] RankingMetrics.precisionAt

2016-12-06 Thread Maciej Szymkiewicz
Thank you Sean. Maybe I am just confused about the language. When I read that it returns "the average precision at the first k ranking positions" I somehow expect there will ap@k there and a the final output would be MAP@k not average precision at the k-th position. I guess it is not enough sleep

Re: [MLLIB] RankingMetrics.precisionAt

2016-12-05 Thread Sean Owen
I read it again and that looks like it implements mean precision@k as I would expect. What is the issue? On Tue, Dec 6, 2016, 07:30 Maciej Szymkiewicz wrote: > Hi, > > Could I ask for a fresh pair of eyes on this piece of code: > > > https://github.com/apache/spark/blob/f830bb9170f6b853565d9dd30

[MLLIB] RankingMetrics.precisionAt

2016-12-05 Thread Maciej Szymkiewicz
Hi, Could I ask fora fresh pair of eyes on this piece of code: https://github.com/apache/spark/blob/f830bb9170f6b853565d9dd30ca7418b93a54fe3/mllib/src/main/scala/org/apache/spark/mllib/evaluation/RankingMetrics.scala#L59-L80 @Since("1.2.0") def precisionAt(k: Int): Double = { require(k >