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

(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 xiN(μ,σ2),
then P(x)=j=1nP(xj;μ,σ2)<ξ is anomalous
机器学习笔记 ---- Anomaly Detection & Recommendation Systems

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 ξ

4. Comparison between Anomaly Detection and Supervised Learning

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

5. Other Features

x>xi/x1i
x>Log(x+i)

(2) Recommendation Systems

1. Content Based Recommendations

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

2. Collaborative Filtering Algorithm

Given θ, Optimize x.
Similarly, this is a linear regression problem.
机器学习笔记 ---- Anomaly Detection & Recommendation Systems

3. Vectorization

The predicted result is

XΘT

How to find two related movies? —Minimize||x(i)x(j)||

4. Mean Normalization

What if θ(i)=0 ?
μ=averageθ(i), predict

XθT+μ