# Calculate the precision@k in Classify

I am interested to measure a precision@k. The Classify function provides a build in an option for that or an elegant approach to calculate this without the need to implement the definition of precision@k? The definition of precision@k is

precision@k = (# of recommended items @k that are relevant) / (# of recommended items @k)

• Can you give a MWE with the intended output. What is unclear to me "precison@k" is what: PPV_k? or something else? – mgamer Dec 20 '18 at 17:36
• I'll try later, right now I'm just with a mobile phone. I did not really understand what is PPv_k that you use. – Kiril Danilchenko Dec 20 '18 at 17:43