前段时间阅读了youtube的经典论文《Deep Neural Networks for YouTube Recommendations》,其通过weighted LR来实现时长预估,在其原文中对实现的描述非常短,大概意思是在损失函数中,对正例(点击)的交叉熵项,添加观看时长作为权重,会使得LR预估的odds=
能代表观看时长,即
可以表示对观看时长的预估,这篇论文很多博文都分析烂大街了,但对于weighted LR来实现时长预估的原理,很多博主分析都很有问题,或者分析似是而非,本文将会从最本质来说明其实现思想。
The model is trained with logistic regression under crossentropy loss . However, the positive (clicked) impressions are weighted by the observed watch time on the video. Negative (unclicked) impressions all receive unit weight. In this way, the odds learned by the logistic regression are
, where
is the number of training examples,
is the number of positive impressions, and
is the watch time of the ith impression. Assuming the fraction of positive impressions is sm