GithubHelp home page GithubHelp logo

Comments (3)

eggie5 avatar eggie5 commented on August 20, 2024

This package uses the Tensorflow Estimators API, so accordingly your mode has a predict function. You can use this to rank documents in a query:

for x in ranker.predict(input_fn=lambda: input_fn_eval(test_path)):
    print(x)

from ranking.

tomleung1996 avatar tomleung1996 commented on August 20, 2024

This package uses the Tensorflow Estimators API, so accordingly your mode has a predict function. You can use this to rank documents in a query:

for x in ranker.predict(input_fn=lambda: input_fn_eval(test_path)):
    print(x)

I'm new to learning to rank, and I need some help on understanding the model's output.
For each iteration, it outputs a (100,) array for a single query, do you know how to interpret this result?

Does it indicate the relevance score of the first 100 "document" (order by document_id)? If so, how can I find the corresponding document in the test dataset? (it seems we don't specify an document_id in the dataset)

Thanks!

from ranking.

sbruch avatar sbruch commented on August 20, 2024

Vertika - Apologies for the delayed response. Alex is correct; you will need to invoke the learned model in predict mode to obtain per-document score. You may then sort documents by their score to obtain a ranked list.

Tom - generally speaking, the per-query output is a Tensor of relevance scores where the i^{th} score corresponds to the i^{th} document in the input Tensor. Note that during training, the dimension of the input Tensor that corresponds to the number of documents per query is fixed to "list-size" (in your case, it appears to be 100). If there are fewer than list-size documents available for your a query, its Tensor is padded.

Please let us know if you have additional questions.

from ranking.

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.