LightGBMError: Label 754 is not less than the number of label mappings (31).
I am training LAMBDA MART in listwise dataset of Letor collection, this dataset contains 64 features.
How can i resolve it?
Can anyone please help me?
# Create LightGBM dataset
group = create_group(result['query_id'])
train_data = lgb.Dataset(result.drop(['relevance', 'query_id'], axis=1), label=result['relevance'], group=group)
# Parameters for the LambdaMART model
params = {
'objective': 'lambdarank',
'metric': 'ndcg',
'learning_rate': 0.05,
'num_leaves': 31,
'min_data_in_leaf': 20,
'lambda_l1': 0.1,
'lambda_l2': 0.1,
'max_bin': 255,
'num_iterations': 100,
'ndcg_eval_at': [1, 3, 5]
}
# Train the LambdaMART model
ranker = lgb.train(params, train_data)
New contributor
Amala K J is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.