-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix CatBoostRanker score computation #2231
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
Conversation
@@ -6228,7 +6228,7 @@ def get_ndcg_metric_name(values, names): | |||
raise CatBoostError("group_id must be initialized. If groups are not expected, pass an array of zeros") | |||
|
|||
predictions = self.predict(X) | |||
return _eval_metric_util([y], [predictions], get_ndcg_metric_name(), None, group_id, group_weight, None, None, thread_count)[0] | |||
return _eval_metric_util([y], [predictions], get_ndcg_metric_name([top, type, denominator], ['top', 'type', 'denominator']), None, group_id, group_weight, None, None, thread_count)[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please also fix the condition in get_ndcg_metric_name
if np.all(np.array(values) == None):
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@dmitrySorokin could you please read and sign the Yandex CLA so that we could merge this PR? |
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=ru |
@arcadia-devtools Ship it! |
CLA already signed |
@arcadia-devtools Ship it! |
@Evgueni-Petrov-aka-espetrov, internal review request created: 3181666 |
@dmitrySorokin |
This PR has been merged in ea09fef |
fix for #2230