当前位置:网站首页>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=1∑Kreli
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=1∑plog2(i+1)reli=rel1+i=2∑plog2(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=1∑plog2(i+1)2reli−1
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=log2225−1+log2324−1+log2423−1+log2522−1+log2622−1=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 Top−N PUSH commend Column surface in Of use Household Count The amount
边栏推荐
- Generate string mode
- Detailed tutorial on connecting MySQL with tableau
- Introduction to 51 single chip microcomputer - LED light
- Xh_ CMS penetration test documentation
- Implement a timer: timer
- [openairinterface5g] high level module interface and ITTI entity thread creation
- 成功解决raise KeyError(f“None of [{key}] are in the [{axis_name}]“)KeyError: “None of [Index([‘age.in.y
- 深度解析Optimism被盗2000万个OP事件(含代码)
- [php]tp6 cli mode to create tp6 and multi application configurations and common problems
- [openairinterface5g] project directory structure
猜你喜欢

Introduction to 51 single chip microcomputer - LED light
![[out of distribution detection] learning confidence for out of distribution detection in neural networks arXiv '18](/img/07/d5479dde181c355d95c73e2f58c0da.jpg)
[out of distribution detection] learning confidence for out of distribution detection in neural networks arXiv '18

6. install the SSH connection tool (used to connect the server of our lab)

Introduction to 51 Single Chip Microcomputer -- the use of Proteus 8 professional

KV260的PMOD接口介绍

Training penetration range 02 | 3-star VH LLL target | vulnhub range node1

Flink core features and principles
![[php] composer installation](/img/37/7adaca01b95085b42a116bc6b08165.png)
[php] composer installation
![[write CPU by yourself] implementation of exception related instructions](/img/79/f2d5e04cfe60e8ae6ea735787ae88b.jpg)
[write CPU by yourself] implementation of exception related instructions

一个算子在深度学习框架中的旅程
随机推荐
Introduction to 51 Single Chip Microcomputer -- minimum system of single chip microcomputer
QT connect to Alibaba cloud using mqtt protocol
Implement a timer: timer
Py's optbinning: introduction, installation and detailed introduction of optbinning
Error when connecting MySQL with dbeaver for the first time
vue连接mysql数据库失败
自定义实现JS中的bind方法
(multithreaded: producer consumer mode) blocking queue
Difference between grail layout and twin wing layout
JS中控制对象的访问
[anomaly detection] malware detection: mamadroid (dnss 2017)
Cactus Song - online operation (4)
猿辅导最强暑假计划分享:暑假计划这样做,学习玩耍两不误
Five common SQL interview questions
Why did I choose rust
Reprint the Alibaba open source project egg JS technical documents cause "copyright disputes". How to use the loose MIT license?
Introduction to 51 single chip microcomputer - LED light
JS中如何阻止事件的传播
[tp6] using the workman websocket
实训渗透靶场02|3星vh-lll靶机|vulnhub靶场Node1