机器学习(8)- 推荐系统

根据Andrew Ng在斯坦福的《机器学习》视频做笔记,已经通过李航《统计学习方法》获得的知识不赘述,仅列出提纲。

1 推荐系统

预测用户\(j\)对电影\(i\)的评分:\((\theta^{(j)})^T(x^{(i)})\)

1.1 基于内容的推荐Content-based

其中\(\theta^{(j)}\)通过学习得来,其优化目标是\(min_{\theta^{(j)}}\frac{1}{2m^{(j)}}\sum_{i:r(i,j)=1}((\theta^{(j)})^Tx^{(i)}-y^{(i,j)})^2+\frac{\lambda}{2m^{(j)}}\sum_{k=1}^n(\theta_k^{(j)})^2\)

总体优化目标\(min_{\theta^{(j)}}\frac{1}{2}\sum_{j=1}^{n_u}\sum_{i:r(i,j)=1}((\theta^{(j)})^Tx^{(i)}-y^{(i,j)})^2+\frac{\lambda}{2}\sum_{j=1}^{n_u}\sum_{k=1}^n(\theta_k^{(j)})^2\)

1.2 协同过滤Collaborative Filtering

其中\(x^{(i)}\)通过学习得来,其优化目标是\(min_{x^{(i)}}\frac{1}{2}\sum_{j:r(i,j)=1}((\theta^{(j)})^Tx^{(i)}-y^{(i,j)})^2+\frac{\lambda}{2}\sum_{k=1}^n(x_k^{(i)})^2\)

1.3 结合起来

\[J(x^{(1)},\cdots,x^{(n_m)},\theta^{(1)},\cdots,\theta^{(n_u)})=\frac{1}{2}\sum_{(i,j):r(i,j)=1}((\theta^{(j)})^Tx^{(i)}-y^{(i,j)})^2+\frac{\lambda}{2}\sum_{i=1}^{n_m}\sum_{k=1}^n(x_k^{(i)})^2+\frac{\lambda}{2}\sum_{j=1}^{n_u}\sum_{k=1}^n(\theta_k^{(j)})^2 \]

可以同时对\(\theta\)\(x\)进行最小化。

向量化(低秩矩阵分解)

\(X\Theta^T\)

均值归一化

\((\theta^{(j)})^T(x^{(i)})+\mu\)

posted @ 2019-06-02 11:21  白芷呀  阅读(168)  评论(0编辑  收藏  举报