ndcg | R Documentation |
Computes the Normalized Discounted Cumulative Gain on a proportion of top observations.
ndcg(observed, predicted, proportion = 1)
observed |
( |
predicted |
( |
proportion |
( |
Normalized Discounted Cumulative Gain is computed as:
where y_i is the observed value of element i, haty_i is the predicted value of element i and k is the number of top observations specified in the proportion parameter.
A single numeric value with the Normalized Discounted Cumulative Gain.
Other rank_metrics:
best_lines_match()
## Not run:
set.seed(1)
x <- rnorm(100)
y <- rnorm(100)
ndcg(x, x)
ndcg(x, x - 1)
ndcg(x, x + 10)
ndcg(x, y)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.