[🐛BUG] Implausible metrics?
See original GitHub issueTrying out my implementation of SLIM with ElasticNet https://github.com/RUCAIBox/RecBole/pull/621 I’m noticing some implausible numbers. Dataset is ml-100k
with all defaults. Using default hyperparameters of my method defined in its yaml file (not yet well-chosen because these results are so off) https://github.com/RUCAIBox/RecBole/blob/41a06e59ab26482dbfac641caac99876c167168c/recbole/properties/model/SLIMElastic.yaml
Using this standard copy-pasted code
dataset_name = "ml-100k"
model = SLIMElastic
config = Config(model=model, dataset=dataset_name)
init_seed(config['seed'], config['reproducibility'])
# logger initialization
init_logger(config)
logger = getLogger()
logger.info(config)
# dataset filtering
dataset = create_dataset(config)
logger.info(dataset)
# dataset splitting
train_data, valid_data, test_data = data_preparation(config, dataset)
# model loading and initialization
model = model(config, train_data).to(config['device'])
logger.info(model)
# trainer loading and initialization
trainer = Trainer(config, model)
# model training
best_valid_score, best_valid_result = trainer.fit(train_data, valid_data)
# model evaluation
test_result = trainer.evaluate(test_data)
logger.info('best valid result: {}'.format(best_valid_result))
logger.info('test result: {}'.format(test_result))
Results:
INFO test result: {'recall@10': 0.8461, 'mrr@10': 0.5374, 'ndcg@10': 0.7102, 'hit@10': 1.0, 'precision@10': 0.6309}
Also, my HyperOpt log is highly suspicious
alpha:0.316482837679784, hide_item:False, l1_ratio:0.9890017268444972, positive_only:False
Valid result:
recall@10 : 0.8461 mrr@10 : 0.5368 ndcg@10 : 0.7099 hit@10 : 1.0000 precision@10 : 0.6309
Test result:
recall@10 : 0.8461 mrr@10 : 0.5374 ndcg@10 : 0.7102 hit@10 : 1.0000 precision@10 : 0.6309
...
alpha:0.47984629320482386, hide_item:False, l1_ratio:0.9907136437218732, positive_only:True
Valid result:
recall@10 : 0.8461 mrr@10 : 0.5368 ndcg@10 : 0.7099 hit@10 : 1.0000 precision@10 : 0.6309
Test result:
recall@10 : 0.8461 mrr@10 : 0.5374 ndcg@10 : 0.7102 hit@10 : 1.0000 precision@10 : 0.6309
...
alpha:0.9530393537754144, hide_item:True, l1_ratio:0.24064058250190196, positive_only:True
Valid result:
recall@10 : 0.6251 mrr@10 : 0.3611 ndcg@10 : 0.4954 hit@10 : 0.9650 precision@10 : 0.4709
Test result:
recall@10 : 0.6535 mrr@10 : 0.4012 ndcg@10 : 0.5357 hit@10 : 0.9745 precision@10 : 0.5019
Exact same results with different parameters?
I figure if there is a mistake in my implementation it would cause bad performance, not amazing performance.
Anyone know what could be causing this?
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)
Hi! @deklanw. 😊 your code looks fine, and I tested the HyperOpt module after adding noise and it also works well. The phenomenon of implausible metrics will disappear and the effect of noise on the results is very small and can be ignored.
Thanks for the help