Skip to content

Fix NDCG metric with non-exp gain.#11534

Merged
trivialfis merged 1 commit into
dmlc:masterfrom
trivialfis:ltr-fix-ndcg
Jun 26, 2025
Merged

Fix NDCG metric with non-exp gain.#11534
trivialfis merged 1 commit into
dmlc:masterfrom
trivialfis:ltr-fix-ndcg

Conversation

@trivialfis

Copy link
Copy Markdown
Member

Close #11517 .

@trivialfis trivialfis mentioned this pull request Jun 26, 2025
10 tasks
Comment on lines +108 to +117
TEST(XGBoostParameter, Json) {
UpdatableParam a, b;
a.UpdateAllowUnknown(Args{{"f", "1024"}, {"d", "2048"}});
auto ja = Json{ToJson(a)};

UpdatableParam c;
FromJson(ja, &c);
ASSERT_FLOAT_EQ(a.f, 1024);
ASSERT_FLOAT_EQ(c.f, 1024);
ASSERT_FLOAT_EQ(b.f, 0); // Make sure dmlc global variable is not used here.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's being tested here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have difficulty understanding how the global parameter manager is implemented in dmlc. Just to make sure updating one parameter doesn't affect others with the same type.

@trivialfis
trivialfis merged commit 2e5225c into dmlc:master Jun 26, 2025
62 of 63 checks passed
@trivialfis
trivialfis deleted the ltr-fix-ndcg branch June 26, 2025 07:39
trivialfis added a commit to trivialfis/xgboost that referenced this pull request Jul 23, 2025
trivialfis added a commit to trivialfis/xgboost that referenced this pull request Jul 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The parameter ndcg_exp_gain=False does not seem to work.

2 participants