Comments (3)
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.
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.
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)
- package Bert
- is_label_valid in utils.py lacks support for integer targets
- Cannot import functions and classes directly
- how can i use the context features like movie title text in listwise ranking
- Extra loss not added to the overall model loss
- Subscores in neural ranking GAM
- [Feature Request] add some multivariate examples (i.e. DLCM, SetRank)
- MRR=1 for movie lens example, how is it possible?
- Custom loss function with MultiTaskPipeline HOT 2
- v0.5.3 not available on pypi HOT 2
- Negative labels are silently masked
- Inputs are not scaled according to the temperature in pair wise losses
- submitted issue by error
- Clarifying global floating point policy
- Landing page example broken HOT 1
- Inconsistent pairwise hinge loss values when using masked labels
- Can I have an example to run distributed ranking on a ray cluster?
- Small bug in create tower
- Tensorflow Estimator no longer supported
- Most of the TFR Losses are always zero
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 ranking.