Practice quiz: Collaborative Filtering
第 1 个问题:You have the following table of movie ratings:Refer to the table above for question 1 and 2;Assume numbering starts at 1 for this quiz, so the rating for Football Forever by Elissa is at (1,1),What is the value of n_u
【正确】4
【解释】This is the number of users. n_m is the number of movies/items and is 3 in this table.
第 2 个问题:What is the value of r(2,2)
【正确】0
【解释】r(i,j) is a 1 if the movie has a rating and 0 if it does not. In the table above, a question mark indicates there is no rating.
第 3 个问题:In which of the following situations will a collaborative filtering system be the most appropriate learning algorithm (compared to linear or logistic regression)?
【正确】You run an online bookstore and collect the ratings of many users. You want to use this to identify what books are "similar" to each other (i.e., if a user likes a certain book, what are other books that they might also like?)
【解释】You can find "similar" books by learning feature values using collaborative filtering.
第 4 个问题:For recommender systems with binary labels y, which of these are reasonable ways for defining when yy should be 1 for a given user jj and item ii? (Check all that apply.)
【正确】y is 1 if user jj fav/likes/clicks on item ii (after being shown the item)
【解释】fav/likes/clicks on an item shows a user's interest in that item. It also shows that an item is interesting to a user.
【正确】y is 1 if user jj purchases item ii (after being shown the item)
【解释】Purchasing an item shows a user's preference for that item. It also shows that an item is preferred by a user.
Practice quiz: Recommender systems implementation
第 1 个问题:Lecture described using ‘mean normalization’ to do feature scaling of the ratings. What equation below best describes this algorithm?
【正确】见上图
【解释】This is the mean normalization algorithm described in lecture. This will result in a zero average value on a per-row basis.
第 2 个问题:The implementation of collaborative filtering utilized a custom training loop in TensorFlow. Is it true that TensorFlow always requires a custom training loop?
【正确】No: TensorFlow provides simplified training operations for some applications.
【解释】Recall in Course 2, you were able to build a neural network using a ‘model’, ‘compile’, ‘fit’, sequence which managed the training for you. A custom training loop was utilized in this situation because training ww, bb, and xx does not fit the standard layer paradigm of TensorFlow's neural network flow. There are alternate solutions such as custom layers, however, it is useful in this course to introduce you to this powerful feature of TensorFlow.
第 3 个问题:Once a model is trained, the 'distance' between features vectors gives an indication of how similar items are. The squared distance between the two vectors x(k) and x(i) is: Using the table below, find the closest item to the movie "Pies, Pies, Pies".
【正确】Pies and You
【解释】The distance from ‘Pies, Pies, Pies’ is 9 + 0 + 0 = 9.
第 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 uses user feedback to fit the prediction model.
【正确】A recommendation system is unable to give accurate rating predictions for a new product that no users have rated.
【解释】A recommendation system uses product feedback to fit the prediction model.
Practice quiz: Content-based filtering
第 1 个问题:Vector x_u and vector x_m must be of the same dimension, where x_u is the input features vector for a user (age, gender, etc.) x_m is the input features vector for a movie (year, genre, etc.) True or false?
【正确】False
【解释】These vectors can be different dimensions.
第 2 个问题:If we find that two movies, ii and kk, have vectors v_m^{(i)} and v_m^{(k)} that are similar to each other (i.e., ||v_m^{(i)} - v_m^{(k)}|| is small), then which of the following is likely to be true? Pick the best answer.
【正确】The two movies are similar to each other and will be liked by similar users.
【解释】Similar movies generate similar v_m’s.
第 3 个问题:Which of the following neural network configurations are valid for a content based filtering application? Please note carefully the dimensions of the neural network indicated in the diagram. Check all the options that apply:【未选全部正确答案】
【正确】The user and item networks have 64 dimensional v_u and v_m vector respectively
【解释】Feature vectors can be any size so long as v_u and v_m are the same size.
第 4 个问题:You have built a recommendation system to retrieve musical pieces from a large database of music, and have an algorithm that uses separate retrieval and ranking steps. If you modify the algorithm to add more musical pieces to the retrieved list (i.e., the retrieval step returns more items), which of these are likely to happen? Check all that apply.
【正确】The system’s response time might increase (i.e., users have to wait longer to get recommendations)
【解释】A larger retrieval list may take longer to process which mayincrease response time.
【正确】The quality of recommendations made to users should stay the same or improve.
【解释】A larger retrieval list gives the ranking system more options to choose from which should maintain or improve recommendations.
第 5 个问题:To speed up the response time of your recommendation system, you can pre-compute the vectors v_m for all the items you might recommend. This can be done even before a user logs in to your website and even before you know the x_u or v_u vector. True/False?
【正确】True
【解释】The output of the item/movie neural network, v_m is not dependent on the user network when making predictions. Precomputing the results speeds up the prediction process.