机器学习笔记 ---- Anomaly Detection & Recommendation Systems

本文探讨了机器学习中的两个重要主题:异常检测和推荐系统。在异常检测部分,介绍了任务定义、算法、评估指标以及与监督学习的区别。在推荐系统中,讲解了基于内容的推荐、协同过滤算法、向量化处理以及平均值归一化的方法。
摘要由CSDN通过智能技术生成

(1) Anomaly Detection

1. Task of Anomaly Detection

Given training set, test whether some new examples are anomalous.

2. Anomaly Detection Algorithm

First choose the parameters which might be indicative of anomalous examples.
Assume every parameter x i ∼ N ( μ , σ 2 ) x_i \sim N(\mu,\sigma^2) xiN(μ,σ2),
then P ( x ) = ∏ j = 1 n P ( x j ; μ , σ 2 ) &lt; ξ P(x)=\prod_{j=1}^n P(x_j;\mu,\sigma^2) &lt; \xi P(x)=j=1nP(xj;μ,σ2)<ξ is anomalous

3. Evaluation of Anomaly Detection Algorithm

Fit the model on training set and test the model on CV set/test set.
Precision/Recall/F1 Score
Use CV set to choose ξ \xi ξ

4. Comparison between Anomaly Detection and Supervised Learning

5. Other Features

x − − − − − − − &gt; x i / x 1 i x -------&gt;x^i/x^{\frac{1}{i} } x>xi/xi1
x − − − − − − − &gt; L o g ( x + i ) x -------&gt;Log(x+i) x>Log(x+i)

(2) Recommendation Systems

1. Content Based Recommendations

For each user, learn a parameter θ \theta θ, use θ T x \theta^T x θTx to predict user’s favorites. x i x_i xi represents the content of i i i-th movie.
This can be solved by linear regression

2. Collaborative Filtering Algorithm

Given θ \theta θ, Optimize x x x.
Similarly, this is a linear regression problem.

3. Vectorization

The predicted result is X Θ T X\Theta^T XΘT
How to find two related movies? —Minimize ∣ ∣ x ( i ) − x ( j ) ∣ ∣ ||x^{(i)}-x^{(j)}|| x(i)x(j)

4. Mean Normalization

What if θ ( i ) = 0 \theta^{(i)}=0 θ(i)=0 ?
μ = a v e r a g e ∑ θ ( i ) \mu=average\sum\theta^{(i)} μ=averageθ(i), predict X θ T + μ X\theta^T+\mu XθT+μ

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值