Skip to content

Issue with Instance Weights in XGBoost for Learning to Rank #11633

@HemakshiShardha

Description

@HemakshiShardha

I’m currently using XGBoost version 1.3.1 to train a Learning to Rank (LTR) model, and I’m having an issue with instance weights. Here’s my setup:

  • I have training and validation data in the same directory, along with two separate files: one for instance weights (.weight file) and another for group information (.group file).
  • The weights file contains event-level weights, with one weight assigned to each event.
  • The group file contains number of instances in each event, with one value assigned to each event.
  • I’ve confirmed that weights are being passed to the DMatrix by printing them using the .get_weight() method.

The issue is that when I train two models—one with weights and one without—the validation NDCG scores for both models are almost identical, and I’m wondering if the model is even using the weights. To further investigate, I’ve even tried using extreme values for the weights, but the NDCG scores are still similar for the model with and without extreme weights.

Is this expected behavior, or is there something I might be missing? Has anyone else encountered this issue, or could there be a bug with instance weights handling in this version?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions