Exploring Recommender Algorithms Through Interactive Visualizations and Sandbox Simulations | November 11 2025, 05:23

I’ve launched an electronic open source application for my book Recommender Algorithms! It’s a “sandbox” where you can “run” various recommendation algorithms with different settings, and view specific visualizations for each algorithm that help understand how it works. For instance, for algorithms like ItemKNN, SLIM, or EASE, a key visualization is a heatmap of the learned similarity matrix (item-item similarity matrix). This allows you to see which pairs of items the model considers “similar” (or “influencing” each other). For SLIM, for example, a useful “Sparsity Plot” shows that the similarity matrix indeed turned out to be sparse. For associative rule algorithms (Apriori, FP-Growth, Eclat) the visualization is not a graph, but interactive tables with found “Frequent Itemsets” and generated “Association Rules,” which can be filtered and sorted.

Additionally, there is a parametric mechanism for creating a “game dataset” — Dataset Wizard. It works like this – there are template datasets that describe items through characteristics. For example, recipes through flavors. Or movies through genres. The system generates random users with a random set of characteristics from the same set — and there are many sliders to make this distribution more contrasted or complex. Next, a matrix of user ratings of items is created – conditionally, if the characteristics of the user and the item match, then the rating will be higher because “tastes match”; conversely, if they differ, then the rating will be lower. Here too, sliders add noise and scarcity – randomly removing part of the matrix. The characteristics of products and users are not fed into the recommendation algorithm; they are hidden, but they are used to visualize the results.

The third component of the application is the tuning of hyperparameters. Essentially, it’s an auto-configurator for a specific dataset. An iterative approach is used, which is much more efficient than a full search (Grid Search) or random search (Random Search). In short, the system analyzes the history of past runs (trials) and builds a probability “map” (surrogate model) of which parameters will likely yield the best result. Then, it uses this map to smartly choose the next combination to test. This method is called Sequential Model-Based Optimization (SMBO).

The code is open source and will be further supplemented with new algorithms and new visualizations.

Link to the code in the comments.

Link to the site where the code is deployed and where you can check out the application is also in the comments.

Leave a comment