1. definition
recommend items based on rating of users who gave similar rating
2. cost function
- learn w ( 1 ) , b ( 1 ) , ⋯ , w ( n u ) , b ( n u ) w^{(1)}, b^{(1)}, \cdots, w^{(n_u)}, b^{(n_u)} w(1),b(1),⋯,w(nu),b(nu)
J = 1 2 ∑ j = 1 n u ∑ i : r ( i , j ) = 1 ( w ( j ) ⋅ x ( i ) − b ( j ) − y ( i , j ) ) 2 + λ 2 ∑ j = 1 n u ∑ k = 1 n ( w k ( j ) ) 2 J = \frac{1}{2}\sum_{j=1}^{n_u} \sum_{i:r(i,j) = 1}(w^{(j)} \cdot x^{(i)} - b^{(j)} - y^{(i, j)})^2 + \frac{\lambda}{2} \sum_{j=1}^{n_u} \sum_{k=1}^{n}(w_k^{(j)})^2 J=21j=1∑nui:r(i,j)=1∑(w(j)⋅x(i)−b(j)−y(i,j))2+2λj=1∑nuk=1∑n(wk(j))2
- learn x ( 1 ) , ⋯ , x ( n m ) x^{(1)}, \cdots, x^{(n_m)} x(1),⋯,x(nm)
J = 1 2 ∑ j = 1 n u ∑ i : r ( i , j ) = 1 ( w ( j ) ⋅ x ( i ) − b ( j ) − y ( i , j ) ) 2 + λ 2 ∑ j = 1 n u ∑ k = 1 n ( x k ( i ) ) 2 J = \frac{1}{2}\sum_{j=1}^{n_u} \sum_{i:r(i,j) = 1}(w^{(j)} \cdot x^{(i)} - b^{(j)} - y^{(i, j)})^2 + \frac{\lambda}{2} \sum_{j=1}^{n_u} \sum_{k=1}^{n}(x_k^{(i)})^2 J=21j=1∑nui:r(i,j)=1∑(w(j)⋅x(i)−b(j)−y(i,j))2+2λj=1∑nuk=1∑n(xk(i))2
- collaborative filter
J ( w , b , x ) = 1 2 ∑ j = 1 n u ∑ i : r ( i , j ) = 1 ( w ( j ) ⋅ x ( i ) − b ( j ) − y ( i , j ) ) 2 + λ 2 ∑ j = 1 n u ∑ k = 1 n ( w k ( j ) ) 2 + ∑ j = 1 n u ∑ k = 1 n ( x k ( i ) ) 2 J(w, b, x) = \frac{1}{2}\sum_{j=1}^{n_u} \sum_{i:r(i,j) = 1}(w^{(j)} \cdot x^{(i)} - b^{(j)} - y^{(i, j)})^2 + \frac{\lambda}{2} \sum_{j=1}^{n_u} \sum_{k=1}^{n}(w_k^{(j)})^2 + \sum_{j=1}^{n_u} \sum_{k=1}^{n}(x_k^{(i)})^2 J(w,b,x)=21j=1∑nui:r(i,j)=1∑(w(j)⋅x(i)−b(j)−y(i,j))2+2λj=1∑nuk=1∑n(wk(j))2+j=1∑nuk=1∑n(xk(i))2
- for binary labels
g ( x ) = 1 1 + e − z f ( x ) = g ( w ( j ) ⋅ x ( i ) − b ( j ) ) ) L = − y ( i , j ) l o g ( f ( x ) ) − ( 1 − y ( i , j ) ) l o g ( 1 − f ( x ) ) j ( w , b , x ) = ∑ L g(x) = \frac{1}{1+e^{-z}}\\ f(x) = g(w^{(j)} \cdot x^{(i)} - b^{(j))})\\ L = -y^{(i, j)}log(f(x)) - (1 - y^{(i, j)})log(1-f(x))\\ j(w, b, x) = \sum L g(x)=1+e−z1f(x)=g(w(j)⋅x(i)−b(j)))L=−y(i,j)log(f(x))−(1−y(i,j))log(1−f(x))j(w,b,x)=∑L
1. definition
recommand items based on fearures of user and item to find good match
2. cost function
J = ∑ ( i , j ) : r ( i , j ) = 1 ( v u ( j ) v m ( j ) − y ( i , j ) ) 2 + N N ( r e g u l a r i z a t i o n − t e r m ) J = \sum_{(i, j):r(i, j)=1}(v_u^{(j)}v_m^{(j)} - y^{(i, j)})^2 + NN(regularization-term) J=(i,j):r(i,j)=1∑(vu(j)vm(j)−y(i,j))2+NN(regularization−term)