eric-haibin-lin commented on a change in pull request #7390: adding ranking 
metrics (precision/recall) at position K. 
URL: https://github.com/apache/incubator-mxnet/pull/7390#discussion_r132746129
 
 

 ##########
 File path: python/mxnet/ranking_metrics.py
 ##########
 @@ -0,0 +1,46 @@
+"""
+A function that implements ranking metrics
+(precision, recall, coverage and converted coverage)
+for a given position K
+"""
+
+def metrics_at_k(Y, Yhat, K):
+    """
+    Parameters
+    ----------
+    Y  : dictionary with key = sample index and value = list of positive 
indices of features
+    Yhat: dict with key = sample index
+              and value = ORDERED list of indices of features, according to 
some score
 
 Review comment:
   Does the model always produce ordered result? is that why you're adding the 
`ordered` restriction here?
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to