Anomaly Detection & Recommender Systems
Anomaly Detection
1.1 Gaussian distribution
1.2 Estimating parameters for a Gaussian
$$\mu {i} = \dfrac {1}{m}\sum{j=1}^{m}x _{i}^{(j)}$$
$$\sigma {i}^{2} = \dfrac{1}{m}\sum{j=1}^{m}(x _{i}^{(j)} - \mu _{i})^2$$
1 | mu = sum(X)/m; |
I thought there was a problem with these equations because the region of highest probability was not displayed as a red ellipse in the PDF plot.
After debugging, I found that the center color of the contour plot for the Gaussian distribution is yellow, which is nearly invisible on non-Retina screens. 😂😂😂
1.3 Selecting the threshold, ε
1 | p = (pval < epsilon); |
Recommender Systems
2.1 Movie ratings dataset
2.2.1 Collaborative filtering cost function
1 | tmp = X*Theta' .* R - Y; |
2.2.2 Collaborative filtering gradient
1 | X_grad = tmp*Theta; |
2.2.3 Regularized cost function
1 | J = J + lambda/2*(sum(sum(Theta.^2))) + lambda/2*(sum(sum(X.^2))); |
2.2.4 Regularized gradient
1 | X_grad = X_grad + lambda*X; |
Translated by gpt-3.5-turbo
Related Posts