I am not able to get the scores as output in a file for each row from the scoring function.
I am using a scoring function to rank my documents in recommendation engine with Python in Jupyter notebook. I am using below code to evaluate on my test data -
def eval_metric_fns():
metric_fns = {}
metric_fns.update({
"metric/ndcg@%d" % topn: tfr.metrics.make_ranking_metric_fn(
tfr.metrics.RankingMetricKey.NDCG, topn=topn)
for topn in [1, 3, 5, 10]
})
return metric_fns
ranker.evaluate(input_fn=lambda: input_fn(_TEST_DATA_PATH), steps=100)
The above code is giving me logits_mean and other metric. Now I need the output file having score for each row of my test data like we get prediction output in any other ml classification problem. Please help!