当前位置:网站首页>Common evaluation indicators of recommended system: ndcg, recall, precision, hit rate

Common evaluation indicators of recommended system: ndcg, recall, precision, hit rate

2022-06-22 06:56:00 chad_ lee

The evaluation index

NDCG

Normalized Discounted Cumulative Gain( Normalized loss cumulative gain )

NDCG Used as an evaluation index for sorting results , Evaluate the accuracy of sorting .

The recommendation system usually returns a... For a user item list , Suppose the length of the list is K, You can use [email protected] Evaluate the gap between the sorted list and the user's real interaction list .

CG ( Cumulative gain Cumulative Gain)

C G K = ∑ i = 1 K r e l i C G_{K}=\sum_{i=1}^{K} r e l_{i} CGK=i=1Kreli

Consider a length of K A list of , r e l i rel_i reli representative i i i The relevance of location items .( In the recommendation system 0、1

There is a problem with this evaluation index , The items I recommend are clustered at the end of the list and scored the same as the head , This is not appropriate .

DCG( Cumulative gain of loss reduction Discounted cumulative gain)

DCG Propose that if the valid results rank low in the list , The list should be penalized for scoring , Punishment is related to the ranking of effective results . So the attenuation factor is added :
D C G p = ∑ i = 1 p r e l i log ⁡ 2 ( i + 1 ) = r e l 1 + ∑ i = 2 p r e l i log ⁡ 2 ( i + 1 ) D C G_{p}=\sum_{i=1}^{p} \frac{r e l_{i}}{\log _{2}(i+1)}=r e l_{1}+\sum_{i=2}^{p} \frac{r e l_{i}}{\log _{2}(i+1)} DCGp=i=1plog2(i+1)reli=rel1+i=2plog2(i+1)reli
perhaps
D C G p = ∑ i = 1 p 2 r e l i − 1 log ⁡ 2 ( i + 1 ) D C G_{p}=\sum_{i=1}^{p} \frac{2^{r e l_{i}}-1}{\log _{2}(i+1)} DCGp=i=1plog2(i+1)2reli1
The latter formula is widely used in industry . When the score is 0/1, namely r e l i ∈ { 0 , 1 } r e l_{i} \in\{0,1\} reli{ 0,1} when , The two are equivalent .

NDCG ( Normalized loss cumulative gain Normalized Discounted Cumulative Gain)

DCG Without considering the recommendation list and the really valid results in each search (test items list) The number of , So finally introduce NDCG, It's standardized DCG.
N D C G k = D C G k I D C G k N D C G_{k}=\frac{D C G_{k}}{I D C G_{k}} NDCGk=IDCGkDCGk
among I D C G IDCG IDCG Refer to ideal DCG, That is, under the perfect result DCG.

For example, recommend to users 7 movie : M 1 , M 2 , M 3 , M 4 , M 5 , M 6 , M 7 M_{1}, M_{2}, M_{3}, M_{4}, M_{5}, M_{6}, M_{7} M1,M2,M3,M4,M5,M6,M7

The user's rating for these seven films is : 5 , 3 , 2 , 1 , 2 , 4 , 0 5, 3, 2, 1, 2, 4, 0 5,3,2,1,2,4,0

Then the perfect recommendation results should be sorted by score : 5 , 4 , 3 , 2 , 2 , 1 , 0 5,4,3,2,2,1,0 5,4,3,2,2,1,0, So at this time IDCG:
I D C G 5 = 2 5 − 1 log ⁡ 2 2 + 2 4 − 1 log ⁡ 2 3 + 2 3 − 1 log ⁡ 2 4 + 2 2 − 1 log ⁡ 2 5 + 2 2 − 1 log ⁡ 2 6 = 31 + 9.5 + 3.5 + 1.3 + 1.2 = 46.5 I D C G_{5}=\frac{2^{5}-1}{\log _{2} 2}+\frac{2^{4}-1}{\log _{2} 3}+\frac{2^{3}-1}{\log _{2} 4}+\frac{2^{2}-1}{\log _{2} 5}+\frac{2^{2}-1}{\log _{2} 6}\\=31+9.5+3.5+1.3+1.2=46.5 IDCG5=log22251+log23241+log24231+log25221+log26221=31+9.5+3.5+1.3+1.2=46.5
therefore N D C G : NDCG: NDCG:
N D C G 5 = D C G 5 I D C G 5 = 38.5 46.5 = 0.827 N D C G_{5}=\frac{D C G_{5}}{I D C G_{5}}=\frac{38.5}{46.5}=0.827 NDCG5=IDCG5DCG5=46.538.5=0.827

Precision、Recall

P r e c i s i o n = pre measuring just indeed Of PUSH commend Column surface Long degree Precision = \frac{ The prediction is correct }{ Recommended list length } Precision= PUSH commend Column surface Long degree pre measuring just indeed Of

R e c a l l = pre measuring just indeed Of use Household real Occasion spot blow Column surface Long degree Recall = \frac{ The prediction is correct }{ The user actually clicks on the length of the list } Recall= use Household real Occasion spot blow Column surface Long degree pre measuring just indeed Of

Hit Rate

H R = measuring try Set in Of i t e m Out present stay T o p − N PUSH commend Column surface in Of use Household Count The amount use Household total Count HR = \frac{ In the test set item Appear in the Top-N Number of users in the recommendation list }{ Total users } HR= use Household total Count measuring try Set in Of item Out present stay TopN PUSH commend Column surface in Of use Household Count The amount

原网站

版权声明
本文为[chad_ lee]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202220543470017.html