How to get prediction score
Similar question as this in this post #59.
That post uses __rank_slates to obtain predicted ranks for y but that doesn't seem to be correct to me. When you look at the function it just returns the original y vector after it has been re orderd (or reranked) but not the predicted ranks.
Is there a function that returns the predicted ranks? or get a predicted score and then generate the rank ourselves?
Another post #44 has mentioned the use of the score function, but I don't understand how to use this from the main script after a model has been trained.
Here is a colab showing the usage of allrank for getting scores for a dataset.
https://colab.research.google.com/drive/1YqtomZ1KI09mOeNDhHTpae-7HRi5Lyh_?usp=sharing
It is basically run of
- generate_dummy_data
- train a model
- score a dataset using a model
parts 1 & 2 are the same as what happens in https://github.com/allegro/allRank/blob/master/scripts/run_example.sh
part 3 is adaptation of
https://github.com/allegro/allRank/blob/master/allrank/rank_and_click.py and https://github.com/allegro/allRank/blob/master/allrank/inference/inference_utils.py to just do scoring and return.
It currently requires a normal dataset (with Y values, since they are used for masking), even though for inference we one shouldn't be forced to provide Y_true
@niccola-tartaglia LMK if that helps!
Thank you so much for sharing this, I will go through this example!!