## Anomaly Detection

### 1.1 Gaussian distribution

### 1.2 Estimating parameters for a Gaussian

mu = sum(X)/m; |

I thought something was wrong in these equations as the region with the highest probability did not show as the pdf tour with a red oval.

After debugging for a while, I found the center of Gaussian distribution contours color is yellow, which is nearly invisible on a none Retina screen. 😂😂😂

### 1.3 Selecting the threshold, ε

p = (pval < epsilon); |

## Recommender Systems

### 2.1 Movie ratings dataset

### 2.2.1 Collaborative filtering cost function

tmp = X*Theta' .* R - Y; |

### 2.2.2 Collaborative filtering gradient

X_grad = tmp*Theta; |

### 2.2.3 Regularized cost function

J = J + lambda/2*(sum(sum(Theta.^2))) + lambda/2*(sum(sum(X.^2))); |

### 2.2.4 Regularized gradient

X_grad = X_grad + lambda*X; |