Recommender Systems Quiz
Practice Quiz: Recommender Systems Implementation
Section titled “Practice Quiz: Recommender Systems Implementation”Question 1
Section titled “Question 1”Lecture described using ‘mean normalization’ to do feature scaling of the ratings. What equation below best describes this algorithm?
Option 1:
- y_norm(i,j) = (y(i,j) - μᵢ) / σᵢ where μᵢ = (1/Σⱼr(i,j)) * Σⱼ:r(i,j)=1 y(i,j) and σᵢ² = (1/Σⱼr(i,j)) * Σⱼ:r(i,j)=1 (y(i,j) - μⱼ)²
Option 2:
- y_norm(i,j) = y(i,j) - μᵢ where μᵢ = (1/Σⱼr(i,j)) * Σⱼ:r(i,j)=1 y(i,j) ✓
Option 3:
- y_norm(i,j) = (y(i,j) - μᵢ) / (maxᵢ - minᵢ) where μᵢ = (1/Σⱼr(i,j)) * Σⱼ:r(i,j)=1 y(i,j)
Mean normalization simply subtracts the average rating for each movie from the individual ratings. It doesn’t involve standard deviation (option 1) or min-max scaling (option 3).
Question 2
Section titled “Question 2”The implementation of collaborative filtering utilized a custom training loop in TensorFlow. Is it true that TensorFlow always requires a custom training loop?
-
Yes. TensorFlow gains flexibility by providing the user primitive operations they can combine in many ways.
-
No: TensorFlow provides simplified training operations for some applications. ✓
TensorFlow offers both approaches: simplified model.compile() and model.fit() for standard neural networks, and custom training loops for specialized algorithms like collaborative filtering.
Question 3
Section titled “Question 3”Once a model is trained, the ‘distance’ between features vectors gives an indication of how similar items are.
The squared distance between vectors x^(k) and x^(i) is: distance = ||x^(k) - x^(i)||² = Σₗ₌₁ⁿ (xₗ^(k) - xₗ^(i))²
Using the table below, find the closest item to “Pies, Pies, Pies”:
Movie | x₀ | x₁ | x₂ |
---|---|---|---|
Pastries for Supper | 2.0 | 2.0 | 1.0 |
Pies, Pies, Pies | 2.0 | 3.0 | 4.0 |
Pies and You | 5.0 | 3.0 | 4.0 |
Calculations:
- Distance to “Pastries for Supper”: (2.0-2.0)² + (2.0-3.0)² + (1.0-4.0)² = 0 + 1 + 9 = 10
- Distance to “Pies and You”: (5.0-2.0)² + (3.0-3.0)² + (4.0-4.0)² = 9 + 0 + 0 = 9
Answer: Pies and You ✓
“Pies and You” has a smaller squared distance (9) compared to “Pastries for Supper” (10), making it more similar to “Pies, Pies, Pies”.
Question 4
Section titled “Question 4”Which of these is an example of the cold start problem? (Check all that apply.)
-
A recommendation system is unable to give accurate rating predictions for a new user that has rated few products. ✓
-
A recommendation system is unable to give accurate rating predictions for a new product that no users have rated. ✓
-
A recommendation system takes so long to train that users get bored and leave.
-
A recommendation system is so computationally expensive that it causes your computer CPU to heat up, causing your computer to need to be cooled down and restarted.
The cold start problem specifically refers to the difficulty of making accurate predictions when there’s insufficient data - either for new users with few ratings or new items with few ratings.