Skip to content

Commit

Permalink
fa-ir evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
Hamedloghmani committed Aug 16, 2023
1 parent 273a30d commit a54ca0e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/fa-ir experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,14 @@
reranked = fair.re_rank(team)
fair_teams.append(reranked)
print(dic_before['ndkl'][i])
print('Done !')
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)

0 comments on commit a54ca0e

Please sign in to comment.