-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix IsBinaryRel() check #9007
Fix IsBinaryRel() check #9007
Conversation
Signed-off-by: Balint Cristian <[email protected]>
Hi, the check was for |
If so, I should reconsider the use case. |
That's the definition of average precision: https://en.wikipedia.org/wiki/Evaluation_measures_(information_retrieval)#Average_precision
|
If you have a special use case where the label is soft and fits into the map framework, please share and I would love to learn more. In that case, we can threshold the label using 0.5. But it's not as rigorous as one might prefer. |
I'll do so, will see if resulted mAP impacts beaviour of TVM's internal model evaluation.
Thanks @trivialfis ! |
@cbalint13 perhaps a better way would be to move away from the map metric. Since likely we need continuous regression ranking. I assume pair-wise or other metrics could still work for such cases. @trivialfis can you confirm if we still support other metrics that comes with continuous rank value output. |
In the last couple PRs, I have changed NDCG to integer only, meaning it accepts only discrete labels, with an additional option for user to specify custom gain function, which can be continuous. The custom gain function still needs a few more PRs to be merged. Other than this, MAP is changed to binary. For ranking where query group is available, AUC supports pairwise definition since a few recent releases (curve constructed from correct/incorrect pairs instead of samples). No additional change is currently planned. Feel free to share your use case and suggestions. :-) |
It would still be useful to have rank values being continuous. The particular use case in TVM was cost model prediction, where we only care about the relative rank of the cost but not their accurate values. The ability to be able to specify the ground truth rank sample where rank score is provided, rather than the pairs is useful as there can be many such pairs in total. While the strict definition MAP indeed follows the binary scheme, it is useful to think about the use-cases where rank score is being provided, as that is usually a more compact case in terms of samples comparing to explicit construction of pairs. |
I am interested to track it, is there a tracker for the upcoming custom gain function (as pr or issue) ? |
#8822 is the WIP PR, I'm extracting small parts of it for review and merge. For continuous rank value, NDCG with custom gain seems to be the right choice. Will keep you updated with the progress. |
This small PR fixes wrong binary checks for labels.
bugwas introduced by Rework the MAP metric. #8931should benow are in range1.0+eps > label > 0.0-eps
, witheps = 1e-6
The errors was cought on TVM autotune process:
Thank you,
~Cristian.
Cc: @trivialfis , @RAMitchell , please help with the review.