From a54ca0e184eaea4bc9d2ff7a94dde893c9ced0e8 Mon Sep 17 00:00:00 2001 From: Hamed Date: Wed, 16 Aug 2023 13:14:48 -0400 Subject: [PATCH] fa-ir evaluation --- src/fa-ir experiment.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/fa-ir experiment.py b/src/fa-ir experiment.py index 0a19dfe..8a9c021 100644 --- a/src/fa-ir experiment.py +++ b/src/fa-ir experiment.py @@ -63,4 +63,14 @@ reranked = fair.re_rank(team) fair_teams.append(reranked) print(dic_before['ndkl'][i]) -print('Done !') \ No newline at end of file +print('Done !') + + +print('Creating inputs for sparse matrix creation...') +idx, probs = [x.id for x in fair_teams], [x.score for x in fair_teams] +print('Done !') + +sparse = Reranking.reranked_preds(teamsvecs['member'], splits, idx, probs, output, 'fa-ir', 50) +new_output = f'{output}/{os.path.split(fpred)[-1]}' + +Reranking.eval_utility(teamsvecs['member'], sparse, fpred, preds, splits, {'map_cut_2,5,10'}, new_output, 'fa-ir', 50)