Suppose you run a bookstore, and have ratings (1 to 5 stars) of books. Your collaborative filtering algorithm has learned
a parameter vector θ(j) θ ( j ) for user j, and a feature vector x(i) x ( i ) for each book. You would like to compute the
“training error”, meaning the average squared error of your system’s predictions on all the ratings that you have gotten
from your users. Which of these are correct ways of doing so (check all that apply)?
For this problem, let m be the total number of ratings you have gotten from your users.
(Another way of saying this is that m=∑nmi=1∑nuj=1r(i,j) m = ∑ i = 1 n m ∑ j = 1 n u r ( i , j ) . [Hint: Two of the four options below are correct.]
* 1m∑nuj=1∑i:r(i,j)=1((θ(j))ix(i)j−y(i,j))2 1 m ∑ j = 1 n u ∑ i : r ( i , j ) = 1 ( ( θ ( j ) ) i x j ( i ) − y ( i , j ) ) 2
* 1m∑nuj=1∑i:r(i,j)=1(∑nk=1(θ(j))kx(i)k−y(i,j))2 1 m ∑ j = 1 n u ∑ i : r ( i , j ) = 1 ( ∑ k = 1 n ( θ ( j ) ) k x k ( i ) − y ( i , j ) ) 2
* 1m∑(i,j):r(i,j)=1∑nk=1((θ(j))kx(i)k−y(i,j))2 1 m ∑ ( i , j ) : r ( i , j ) = 1 ∑ k = 1 n ( ( θ ( j ) ) k x k ( i ) − y ( i , j ) ) 2
* 1m∑(i,j):r(i,j)=1(∑nk=1(θ(j))kx(i)k−y(i,j))2 1 m ∑ ( i , j ) : r ( i , j ) = 1 ( ∑ k = 1 n ( θ ( j ) ) k x k ( i ) − y ( i , j ) ) 2
* 答案: 2 4 –> 这个答案是正确的 *
In which of the following situations will a collaborative filtering system be the most appropriate learning algorithm (compared to linear or logistic regression)?
* 答案: 1 4 选出协同过滤系统适合的场景 *
* 选项1: 你经营一家在线书店,你要去这个算法去判断哪些书是同一类的. 书的种类与特征都很多不可能用logistic去一一处理,用协同很好. 正确 *
* 选项2: 你经营一家在线书店, 你要对某一类书的销量作预测.这个跟房价的预测是一样的用logistic. 不正确 *
* 选项3: 你是一个艺术大师,为顾客画肖像,每个顾客最多买1个消像并反馈1-5分,你要预测下一个用户的评分. 不正确 *
* 选项4: 你经营一家服装店,卖各种款式与品牌的jeans,你从经常购买的人群中收集了他们对不同款式与品牌的反馈,你要利用这些反馈来给那些最可能卖出去的jeans打折. 正确 *
You run a movie empire, and want to build a movie recommendation system based on collaborative filtering.
There were three popular review websites (which we’ll call A, B and C) which users to go to rate movies,
and you have just acquired all three companies that run these websites.
You’d like to merge the three companies’ datasets together to build a single/unified system.
On website A, users rank a movie as having 1 through 5 stars. On website B, users rank on a scale of 1 - 10,
and decimal values (e.g., 7.5) are allowed. On website C, the ratings are from 1 to 100.
You also have enough information to identify users/movies on one website with users/movies on a different website.
Which of the following statements is true?
* 答案: 1 *
* 选项1: . 正确 *
Which of the following are true of collaborative filtering systems? Check all that apply.
Suppose you have two matrices A A and B B , where A A is 5x3 and B B is 3x5. Their product is C=AB, a 5x5 matrix. Furthermore, you have a 5x5 matrix R where every entry is 0 or 1. You want to find the sum of all elements C(i,j) for which the corresponding R(i,j) is 1, and ignore all elements C(i,j) C ( i , j ) where R(i,j)=0 R ( i , j ) = 0 . One way to do so is the following code:
Which of the following pieces of Octave code will also correctly compute this total? Check all that apply. Assume all options are in code.
* 答案: 1 2 点乘.*: R(5x5) C(5x5),上图代码实现的就是: C .* R *
* 区分 octave中的 与 .*, * 是矩阵相乘, .*是对应元素相乘 **
* A=[1324]B=[2323] A = [ 1 2 3 4 ] B = [ 2 2 3 3 ] *
* 则 A∗B=[818818]A.∗B=[818818] A ∗ B = [ 8 8 18 18 ] A . ∗ B = [ 8 8 18 18 ] *
* 选项1: C=A*B C.*R之后求和,就是代码中的值 *
* 答案: 1 2 *