Home Documentation Github Paper


A flexible simulation framework for evaluating recommender systems in dynamic environments.

What is RecLab?

RecLab is a simulation framework used to evaluate recommendation algorithms. The framework makes no platform-specific assumptions. As such, it can be used to evaluate recommendation algorithms implemented with any computational library.

On the right is a visualization of the interaction between environment and recommender.

RecLab also implements many existing recommenders for the purpose of benchmarking. The recommenders include factorization machines, neural models, and simple baseline algorithms.

Getting Started

To install RecLab, run

      pip install reclab

RecLab also implements a set of benchmark recommender systems, however the default pip install command will not fetch the necessary dependencies. To fetch these dependencies you must have g++ 5.0 or higher and python3-dev installed. You should then run

      pip install reclab[recommenders]

which will install both the core reclab framework and the benchmark recommendation algorithms.


The code below shows a simple use-case with random recommendations.

      import numpy as np
      import reclab
      env = reclab.make('topics-dynamic-v1')
      items, users, ratings = env.reset()
      for _ in range(1000):
        online_users = env.online_users
        # Your recommender here. This recommends random items.
        recs = np.random.choice(items, size=(len(online_users), 10))
        items, users, ratings, info = env.step(recs)


RecLab's environments span a variety of user behaviors.

To see a description of available environments see the list of environments.


RecLab includes a suite of recommender models, ranging from battle-tested matrix factorization models to more recent neural approaches.

RecLab implements twelve different recommender models for recommendation, though the framework is designed to allow you to easily evaluate a custom model.