# Recommender system report
## Summary
The table consists of the Recency score (R_score) for each user and Mobi merchant category (mcc). We have 307K users and 26 MCC. The testset equals 390K samples where each sample represents a triplet of (UserID, MCC, R_score).
## Dataset
The table consists of the Recency score (R_score) for each user and Mobi merchant category (mcc). We have 307K users and 26 MCC. The testset equals 390K samples where each sample represents a triplet of (UserID, MCC, R_score).
## Methods
### MF
At this level, we limited ourselves to the most simple learning method. We applied Matrix factorization using gradient descent for optimization. The learning rate, user regularization factor, and mcc regularization factor are equal to 0.1, 0.04, and 0.04, respectively. The latent dimension of the matrix factorization is equal to 20.
### Baseline Methods
#### Naive Average
In this method, we predict the score of all test samples by simply computing the average of all finite values in the corresponding column.
#### Sampling from a normal distribution of naive mean and std
It is similar to the above method, but we also compute the std and sample from a normal distribution that has two parameters: simple average and std.
#### Grouby similar mcc average
In this approach, instead of computing the average of all users that might not share any similarity with the tested subject, we group by all users who have the same score in a given mcc. We limit our grouping iterations to 3. In each iteration, we select an MCC, and then we group by all users who have the same R_score as our test subject in this mcc. The selection of mcc can be random or based on the most popular mcc.
#### Top K Cosine similarity
This is a popular method that ranks all users based on their similarity with the testest subject. The similarity is measured using the cosine distance between the sequence of R-scores for each user. Next, we apply the averaging followed in the first baseline method only on the top K row. In this experiment, we adopted K equal 5.
## Results
| Method | RMSE | Accuracy |
| ------------------------| -------- | -------- |
| Naive average | 1.06 | 0 |
| Stochastic Naive average| 1.51 | 0 |
| Groupby Average (stochastic)| 0.8 | 0.3 |
| Groupby Average (ranked)| 0.79 | 0.33 |
| Top K cosine similarity | $\bf0.11$| 0.28 |
| MF | 0.18 | $\bf0.46$|

Heatmap of correlation between trained embedding of mcc
### MF results with different table density
| MCC_limit | MF | Cosine Similarity
| ----------| -----| -----------------
| | RMSE | RMSE|
| 1 | 0.147|x|
| 3 | 0.126|x|
| 5 | 0.164|x|
| 7 | 0.193|x|
| 9 | 0.204|x |
| 11 | 0.225|0.136|
| 13 | 0.325|0.169|
| 15 | 0.374|0.17|
### MCC histogram
To be done!