On the planet of machine studying, evaluating the efficiency of fashions is essential to understanding their effectiveness. Whereas many metrics are available in libraries, constructing these metrics from scratch can present a deeper understanding of their mechanics. On this article, we’ll dive into two broadly used analysis metrics: Normalized Discounted Cumulative Achieve (NDCG) and Space Underneath the Receiver Working Attribute Curve (AUC-ROC). We’ll discover their definitions, use circumstances, and how you can implement them from scratch in Python.
Normalized Discounted Cumulative Achieve (NDCG) is a measure used to judge the standard of rankings produced by fashions, particularly in data retrieval and suggestion methods. It considers the place of the related objects within the rating, giving greater scores for related objects showing on the high.
Method for NDCG
To calculate NDCG, we first have to compute the Discounted Cumulative Achieve (DCG):