# Content-Based Recommender Systems III Profile Learner

#### Introduction

As my previous posts, I described several aspects of Recommender System. In this post, I will add more Machine Learning falvor into this topic. I will introduce the mathmatical problem fomulation and some algorithm to learn user profile.

#### Problem Formulation

##### Notation:

$r(i,j) = 1$ if user $j$ has rated object $i$ (0 otherwise)

$y^{(i,j)} = $ rating by user $j$ on object $i$ (if defined)

$\theta^{(j)} =$ parameter vector for user $j$

$x^{(i)} =$ feature vector for object $i$ (this is to describe the similarity among objects. eg. For movies, we can have a vector to denote how much percent it looks like a romance or action)

$m^{(j)} =$ number of objects rated by user $j$

The user’s profile is defined by $\theta^{(j)}$. The recommendation is based on the prediction rating of $(\theta^{(j)})^{T} (x^{(i)})$

##### Learning

It’s actually a regression problem.

Goal: To learn $\theta^{(j)}$ for user $j$

$min_{\theta^{(j)}}$ $\frac{1}{2} \sum_{i,r(i,j)=1} $ $ (\theta^{(j)})^{T}$ $(x^{(i)})$ $ - {y^{(i,j)}}^{2}$ $+$ $ \frac{\lambda}{2} \sum_{k=1}^{n}(\theta_k^{(j)})^2$

To learn all users’ profiles, just need to sum up through all users

We can use Gradient