Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.4.0
-
None
Description
The formula of the precision @ k for measuring the quality of the recommendations:
https://spark.apache.org/docs/latest/mllib-evaluation-metrics.html#ranking-systems
says that j goes from 0 to min(|D|, k) , but according to the code,
val n = math.min(pred.length, k)
The notation of Spark documentation defines
D_i as the set of ground truth relevant documents for user i
R_i as the set of recommended documents (i.e. predictions) given for user i .
According to the code, the documentation should say j goes from 0 to min( | R_i |, k )
Attachments
Issue Links
- links to