Groups samples according to group, sorts them within each group based on output and computes the Normalized Discounted Cumulative Gain (NDCG) at 1 for each group. Concretely, the NDCG at 1 is:

ndcg_at_1(output, gain, group, name = "")

Arguments

name

Details

$NDCG_1 = gain_(1)_i gain_i$

where gain(1)gain(1) means the gain of the first ranked sample.

Samples in the same group must appear in order of decreasing gain.

It returns the average NDCG at 1 across all the groups in the minibatch multiplied by 100 times the number of samples in the minibatch.

This is a forward-only operation, there is no gradient for it.