GithubHelp home page GithubHelp logo

Comments (6)

AmenRa avatar AmenRa commented on July 30, 2024

Hi Paul,

The rationale behind forcing sorting is to prevent the users to forget about it, which could cause a wrong evaluation.

I thought about adding an option to avoid sorting to add_multi to avoid useless computation.
You could add queries to your Run / Qrels by batch, causingranx to perform sorting even when it's not needed.
Because of that, I suggest using .from_dict to create Run / Qrels at the moment.

However, your problem poses a question about evaluating your lists as they are not ranked.
If you are sure everything is fine with your data/model, you should manage the issue for your specific case.
Otherwise, you could run into reproducibility issues, in my opinion.

Sorry if what I'm about to say seems obvious.
If you have a sorted list of document IDs without meaningful scores, you could generate those as simple as follows:

scores=[s for s in range(len(doc_ids))][::-1]

It seems pretty feasible to me. What do you think?

Best,

Elias

from ranx.

PaulLerner avatar PaulLerner commented on July 30, 2024

Hi,

Thanks for your answer.
I wonโ€™t get into the details but my use case is actually a little bit more tricky than this.

Iโ€™ll consider using from_dict!

from ranx.

AmenRa avatar AmenRa commented on July 30, 2024

Mind that from_dictstill triggers sorting.

from ranx.

PaulLerner avatar PaulLerner commented on July 30, 2024

Oh, ok, I misunderstood your first answer. So are you still considering

adding an option to avoid sorting to add_multi to avoid useless computation

?

from ranx.

AmenRa avatar AmenRa commented on July 30, 2024

I am, but I will probably make changes that do not solve your issue.
My idea is to postpone the sorting operation to the first time a Qrels or Run is used for evaluation, following the lazy evaluation paradigm, but not to make sorting completely optional.
As I told you before, I want ranx to take care of everything so that the user doesn't have to worry about sorting and other operations.

from ranx.

PaulLerner avatar PaulLerner commented on July 30, 2024

Ok, I understand, thanks for your quick answers :)

from ranx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.