본문 바로가기

추천 시스템/Content-based Filtering

[CB Filtering] 4. Profile Learner(1)

지금까지는 CB Filtering의 전체적인 개요, Content Analyzer를 공부했다. 지금부터는 Profile Learner에 대해 공부할 것이다.



Profile Learner에는 다음과 같은 종류가 있으며, 이번 포스팅에서는 Least Square만 설명할 것이다.

1. Least Square
2. Naive Bayes
3. Rocchio's Algorithm




위 그림은 유저들이 영화에 대해 점수를 매긴 것이다.(점수 뿐만 아니라 유저가 자신의 선호를 나타낸 것이라면 아무거나 상관없다.)

  feature 1 feature 2 feature 3
Love at last 1 0.9 0
Romance forever 1 1.0 0.01
Cute puppies of love 1 0.99 0
Nonstop car chases 1 0.1 1.0
Swords vs. karate 1 0 0.9


또한 영화는 전 시간에 배웠던 Content Analyzer 등을 통해 $\mathbb{R}^3$에 표현했다. (User Profile도 마찬가지로 $\mathbb{R}^3$에 표현할 것이다.)

위 두 정보를 기반으로 Least Square를 수행한다.

$min_{\theta^{(1)},...,\theta^{(n_u)}}\Sigma_{j=1}^{n_u}\Sigma_{i:r(i,j)=1}((\theta^{(j)})^Tx^{(i)}-y^{(i,j)})^2+\lambda\Sigma_{j=1}^{n_u}\Sigma_{k=1}^n(\theta_k^{(j)})^2$

$n_u$ : 유저의 수
$\theta^{(n_u)}$ : $n$번째 유저의 Profile($\theta^{(n_u)}\in\mathbb{R}^3$)
$r(i,j)$ : 유저가 영화를 평가했는지 여부(평가했다면 1, 안했다면 0)
$x^{(i)}$ : $i$번째 영화의 Latent Factor
$y(i,j)$ : 유저가 영화에 대해 매긴 점수
$\lambda$ : Regularization parameter