recomendation systems

9 Jan 2018

This post is to resume different options to do make a recomendation system

All recommendations have two components (ther characteristicas could be known or unknown):

  • items to be recommended, the content (m)
  • users to recommend items (n)

Content Based recommendation I

This example is extracted from coursera machine learning course, that basically consists on make a linear regression with the content features and the existing ratings of each user.

It’s important to have some ratings from user on other contents in order to guess his preference from the new content.

$x^{(i)}$ = feature vector for each content ($k$ features).
$\theta^{(j)}$ = parameter vector for user j, $\theta^{(j)} \in \mathbb{R}^{k+1}$ because the bias component

$y^{(i,j)}$ = rating by user j on content i (if defined) $r(i,j) = 1$ if user $j$ has rated the content $i$ (O otherwise)

You have all $x^{(i)}$ bu some $y^{(i,j)}$ are not defined.

Solution: make a linear regresion with known parameters and use the result to compute the gaps: $y^{(i,j)}$

Learn $\theta^{(j)}$ (parameter for user j):

Gradient descent update.

Repeat:

For each user $j$, content $i$, compute rating as $(\theta^{(j)})^T(x^{(i)})$

Example colaborative Filtering 1

Colaborative Filtering I

How to retrieve content features from user ratings? The same algorithm but derivative is from $x^{(i)}$:

Learn $x^{(i)}$ (content i):

Gradient descent update.

Repeat:

Example colaborative Filtering 2

Colaborative Filtering II

This is the complete colaborative algorithm. Both content features and ratings are calculated from user current ratings $y^{(i,j)}$.

Minimizing $x^{(1)},….x^{(n_m)} \text{ and }\theta^{(1)},….\theta^{(n_u)}$

Gradient descent update.

Initialize randomly $x^{(i)}_k$ and $\theta^{(j)}_k$ and repeat:



who am i

Engineer in Barcelona, working in BI and Cloud service projects. Very interested in the new wave of Machine-Learning and IA applications

what is this

This is a blog about software, some mathematics and python libraries used in Mathematics and Machine-Learning problems

where am i

github//m-alcu
twitter//alcubierre
linkedin//martinalcubierre
facebook//m.alcubierre
2017 by Martín Alcubierre Arenillas.
Content available under Creative Commons (BY-NC-SA) unless otherwise noted.
This site is hosted at Github Pages and created with Jekyll.