Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Basic script allowing for fusioning runs in Anserini. Receives two runs, normalizes them with min-max sum (following ranx https://amenra.github.io/ranx/normalization/#min-max-norm) and pushes it back to a file. Probably needs some added tests and better names for functions and variables as my java has been contaminated by python.
Tested by using the pyserini 2cr to generate trec-covid runs for contriever, bm25-flat and contriever-msmarco, then generates fusioned runs:
Fuse BM25 and Contriever
./target/appassembler/bin/FuseRuns -filename_a ../run.beir.bm25-flat.trec-covid.txt -filename_b ../run.beir.contriever.trec-covid.txt -filename_output test_fusion.txt
Fuse BM25 and Contriever-Msmarco
./target/appassembler/bin/FuseRuns -filename_a ../run.beir.bm25-flat.trec-covid.txt -filename_b ../run.beir.contriever-msmarco.trec-covid.txt -filename_output test_fusion_2.txt
Validated by running comparisons on ranx
For which the result is:
There is a small difference in the 3rd decimal point of ndcg@10 (0.001) that may come from some trec-covid being too small and subject to some precision differences between python and java...