传统的kNN模型
为了获得用户对产品的评分预测值,kNN模型一般包括以下三步:
1.计算相似度
这步中计算每对产品之间的相似度
Person correlation:
\[S _ {mn} ^{P} = \frac {\sum _ {v\in{P^{mn}} {{\left( r _ {v,m} - \overline {r}^{m}\right)}{\left( r _ {v,n} - \overline{r}^{n}\right)}}}}{\sqrt{\sum _ {v\in{P}^{mn}}\left( r _ {v,m} - \overline {r}^{m}\right)^2{\sum _ {v\in{P}^{mn}}\left( r _ {v,n} - \overline{r}^{n}\right)^2}}}\]
Cosine:
Adjusted Cosine:
Squared Distance:
2.选择邻居
为了预测用户u对电影m的评分值,我们首先从 \([]\)
3.产生预测值
This expression \(\sqrt{3x-1}+(1+x)^2\) is an example of a \(\LaTeX\) inline equation.