ndcg: Function to calculate mean Normalized Discounted Cumulative...

View source: R/workbench.R

ndcgR Documentation

Function to calculate mean Normalized Discounted Cumulative Gain (NDCG)

Description

This function calculates NDCG from the vectors of observed and predicted values and the chosen proportion k of top observations (rank).

Usage

ndcg(y, y_hat, k = 0.2)

Arguments

y

true values

y_hat

predicted values

k

relevant proportion of rank (top)

Value

a real value in [0,1]


GROAN documentation built on Nov. 28, 2022, 5:07 p.m.