powered by
This function calculates NDCG from the vectors of observed and predicted values and the chosen proportion k of top observations (rank).
ndcg(y, y_hat, k = 0.2)
a real value in [0,1]
true values
predicted values
relevant proportion of rank (top)