1. 程式人生 > >機器學習筆記 ---- Anomaly Detection & Recommendation Systems

機器學習筆記 ---- 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

2)" role="presentation" style="position: relative;"> x i N ( μ , σ 2
)
,
then P ( x
) = j = 1 n P ( x j ; μ , σ 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 ξ

4. Comparison between Anomaly Detection and Supervised Learning

5. Other Features

x > x i / x 1 i
x > L o g ( x + i )

(2) Recommendation Systems

1. Content Based Recommendations

For each user, learn a parameter θ , use θ T x to predict user’s favorites. x i 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.

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 ?
μ = a v e r a g e θ ( i ) , predict

X θ T + μ