---
# System prepended metadata

title: Matrix Factorization For Recommendation

---

# Matrix Factorization For Recommendation

How to recommend items based on rating data?


## Data

Movielens-100k (Movie review)
![](https://i.imgur.com/8scDZgg.png)


![](https://i.imgur.com/PCysoiU.png)


## Matrix Factorization

![](https://i.imgur.com/FKgjimb.png)

![](https://i.imgur.com/c8jijzY.jpg)

## What is good baseline?

![](https://i.imgur.com/PCysoiU.png)

1. Uniform Random (0~5)
2. Global Means 
   = (2+4+5+1+2+1+4)/7 
   = 3.28
3. Mean of means
   = (Mean + item_mean + person_mean)/3
   = (3.28+ 5 + (1+4)/2)/3
   = 3.6
   
## Used library

Tried method:
PMF, PMF MCMC, SVD, SVD ++ 

1. PMF MAP -> Bayesian approach
2. PMF MCMC -> Bayesian + Markov chain monte carlo　approach
3. Funk SVD -> Netflix prize algorithm 3rd place
4. SVD ++ -> Funk SVD + implicit rating

### Error
RMSE = (1/N * sum((Rating - predicted rating)**2)) **0.5

# Result



### Tutorial

### Data
![](https://i.imgur.com/RI188uI.png)

### predict
![](https://i.imgur.com/aiGeKiB.jpg)

### result
![](https://i.imgur.com/8Qf05du.png)


### Tried

ml-100k latest

### Data
![](https://i.imgur.com/WF4iO63.png)

### predict
![](https://i.imgur.com/iAXVB5U.png)

![](https://i.imgur.com/35JGNXn.png)

![](https://i.imgur.com/PYkwdBV.png)

### 


### Data
![](https://i.imgur.com/POvarUi.png)

### predict
![](https://i.imgur.com/v7tSsqG.jpg)

![](https://i.imgur.com/AJbaOQk.png)

![](https://i.imgur.com/iBvK2GZ.png)
