Counting 1,899 Big Data & Machine Learning Frameworks, Toolsets, and Examples...
Suggestion? Feedback? Tweet @stkim1

Last Commit
Oct. 19, 2017
May. 10, 2017


reco is an R package which implements several algrithms for matrix factorization targeting recommender systems.

  1. Weighted Regularized Matrix Factorization (WRMF) from Collaborative Filtering for Implicit Feedback Datasets (by Yifan Hu, Yehuda Koren, Chris Volinsky). One of the most efficient (benchmarks below) solvers.
  2. Linear-Flow from Practical Linear Models for Large-Scale One-Class Collaborative Filtering. This algorithm is similar to SLIM but looks for factorized low-rank item-item similarity matrix.
  3. Regularized Matrix Factorization (MF) - classic approch for "rating" prediction.

Package is quite fast:



  1. Introduction to matrix factorization with Weighted-ALS algorithm - collaborative filtering for implicit feedback datasets.
  2. Music recommendations using LastFM-360K dataset
    • evaluation metrics for ranking
    • setting up proper cross-validation
    • possible issues with nested parallelism and thread contention
    • making recommendations for new users
    • complimentary item-to-item recommendations
  3. Benchmark against other good implementations


We follow mlapi conventions.

Notes on multithreading and BLAS

VERY IMPORTANT if you use multithreaded BLAS (you generally should) such as OpenBLAS, Intel MKL, Apple Accelerate, I highly recommend disable its internal multithreading ability. This leads to substantial speedups for this package (can be easily 10x and more). Matrix factorization is already parallelized in package with OpenMP. This can be done by setting corresponding environment variables before starting R:

  2. Intel MKL: export MKL_NUM_THREADS=1
  3. Apple Accelerate: export VECLIB_MAXIMUM_THREADS=1

It it also possible to change number of threads in runtime, see for example following packages: