Skip to content

KeyError on LambdaRank Tutorial #21

Description

@rikiachmad

I basically follow the exact step with your tutorial on /tutorial/ptranking_demo_ltr.ipynb file. I used the same dataset from LETOR 4.0 MQ2008 but got a KeyError in this line of code lambdarank_losses, lambdarank_train_ndcgs, lambdarank_test_ndcgs = ltr_evaluator.naive_train(ranker=lambdarank, eval_dict=eval_dict, train_data=train_data, test_data=test_data). It was fine with the RankNet though.
Error:

label_type = kwargs['label_type']
     32         assert LABEL_TYPE.MultiLabel == label_type
     33         assert 'presort' in kwargs and kwargs['presort'] is True  # aiming for direct usage of ideal ranking

KeyError: 'label_type'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions