Comments (4)
Thanks a lot. I got it.
from ranx.
Hi, you can find an example on Colab and other information here.
As for your example, you could to something like this:
from ranx import Run, fuse
run_1 = Run({"q1": {"item1": 0.4, "item2": 0.8, "item3": 0.7, "item4": 0.5}})
run_2 = Run({"q1": {"item1": 0.8, "item2": 0.7, "item3": 0.7, "item4": 0.6}})
run_3 = Run({"q1": {"item1": 0.2, "item2": 0.7, "item3": 1.0, "item4": 0.7}})
combined_run = fuse(runs=[run_1, run_2, run_3], method="max")
print(combined_run.to_dict()["q1"])
Output:
{
"item2": 1.0,
"item3": 1.0,
"item1": 1.0,
"item4": 0.625,
}
EDIT: copy-pasted wrong output dict.
from ranx.
Thank you for your reply! it is very helpful and I will try it soon.
By the way, any suggestions for speeding up when the number of items and the subranks (e.g., tens of thousands of items and dozens of subranks) are both large?
from ranx.
Neither the implemented methods nor the implementation itself are meant to be used in the context you describe.
Usually, we aggregate two or three rankings for 1k documents each (the top 1k in each ranking).
Give ranx
a try for your use case. Maybe use it to find the method that works best with a sample of your data and then build your custom implementation that can run on the GPU.
I do not think you can do much better than my implementation performance-wise, at least not in Python.
from ranx.
Related Issues (20)
- [BUG] Could not find a version that satisfies the requirement ranx HOT 4
- ValueError: max() arg is an empty sequence HOT 7
- question: why student rather than fisher stat test? HOT 4
- [Feature Request] Add interpolated recall-precision plot function HOT 4
- [BUG] Missing results causes AssertionError HOT 1
- PSP@k: Propensity-scored precision at k HOT 9
- [Feature Request] Expose DCG as metric HOT 3
- [BUG] dcg and dcg_burges do not work in the compare function HOT 2
- [Feature Request] Use black to indent the code HOT 1
- [BUG] RBP with multiple relevance levels HOT 3
- [Feature Request] Support gzipped files? HOT 3
- [Feature Request] memory issue / make Run more efficient HOT 2
- Incorrect result for f1 score HOT 13
- Zero-scored documents HOT 10
- [BUG] Misleading exception message on dataframe types HOT 2
- [BUG] Issues when storing/loading Qrels from a dataframe and a parquet file. HOT 6
- [Feature Request] Run.from_df and Run.from_parquet does not allow specifying run name HOT 1
- Getting "Segmentation fault (core dumped)" error HOT 2
- [Feature Request] stddev statistic HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ranx.