A Simple Custom Similarity-Based Recommender System

AbstractThe demand of recommender systems has been greatly increased for the last few times after the trending of personalization within various kind of systems. This leads to the better achievement of the best recommendation or more precise result could be for both service providers or users. So there is actually a need for users to create their own custom recommendation in a small scale. That would help them get personal recommendations as simple and fast as possible, but without having to involved in a complex system. For the better and more precise result, the system would be enhanced with semantic similarity method. One of the best method to achieve this is by using a framwork, such as Crab Python framework for building recommender engines or systems. As the outcome, regular users could provide themselves with simple custom recommendations by their own configuration. The best case would present users the most related recommendations with high accuracy of preferences.


Recommender systems have always been used for almost anything that related within user and usage relation of subjects, entities, and ratings. Most of them are created specifically for particular subjects. It can be used primarily for research, user assistant, personal needs, or even just for fun. This kind of dynamic feedback based on actual collected data is helpful to find the most related or appropriate information that would be presented. Nevertheless, it's still only made by researchers, producers, or creators. If regular users want to exactly configure their needs and have a small scale recommendation for personal use, they need to use a simpler method to achieve the result that recommender system could produce. So without having to complicate themselves with various algorithms and a lot of information that they need to know before. In this case, using a framework is recommended to build that kind of recommender system. Still, people will know the underlying principles behind the system but while understanding and building in the highest system layer. Moreover, the system would be enhanced with a semantic similarity or semantic relatedness method. So the better and more precise the recommendation results would be.

Similarity-Based Recommender System

Recommender system or recommendation engine are so called to basically give people or users more offers or options about something that closely related with the item or content they're liking, watching, or using. The item could be a foods, books, movies, songs, games, places, and so on even people. Most of them are created by the developers, specifically or focused only just to recommend chosen subjects. People mostly have various tastes, but those can be calculated as patterns or converted into models. What will be done in this work is taking those patterns or models, then generate the recommendations with similarities in mind. Because of that, this will also considered as a semantic similarity system since the relation between items are all logically related and meaningful. Actually the real considered semantic recommender is any system that bases its performance on a knowledge base (Peis 2008). Also lately, the basic good recommendation is one that increases the usefulnes of your product in the long run, even it's hard to measure directly (Levy 2013). Or better yet, that could gives or predicts a similar, better, or new desirable things that might haven't know or discovered yet by the users.

This work in progress will focus on the item-based recommenders approach, figuring out what items are similar with the one that have already been liked. Item-based or similarity-based recommender system is included in a bigger scale called collaborative filtering and moreover, machine learning. Generally it produces recommendations based on the information or knowledge that users have about their relationships to one or some items. So there is is no requirement for prior knowledge of the properties or attributes of the items themselves. The items could be so various like some of the mentioned before and nothing about their attributes need to enter into any of the input.

Crab Recommender Systems Framework

Crab, formerly known as aureplacedverbatimaa , is a Python framework for building recommender systems and engines integrated with the world of scientific Python packages (http://muricoca.github.io/crab) (Caraciolo 2012). It's released as an open source project and commercially usable with BSD license (3 clause).

It has useful segmented features:

  • Recommender Algorithms: User-Based Filtering and Item-Based Filtering.
  • Work in progress: Slope One, SVD, Evaluation of Recommenders.
  • Planned: Sparse Matrices, REST API’s.

Which will be used in this work is item-based filtering for defining semantic similarity items.


There are few main components that need to be installed and it can be done from:

  • Operating system package distribution
  • Official release archive or repository

It is more recommended to install from source by having these dependencies first (with their common package names):

  • Python development tools (python-dev)
  • Numpy (python-numpy, python-numpy-dev)
  • setuptools (python-setuptools)
  • SciPy (python-scipy)
  • Atlas Build Tool (libatlas-dev)
  • GNU C++ Compiler (g++)
  • scikit-learn for Machine Learning (scikits.learn)
  • matplotlib (python-matplotlib)
  • nose Unit Testing Framework (nose)

Then finally the Crab framework (crab). All can be done by using os-based package managers; apt-get, pip or easy_install. Or also get the repository (https://github.com/muricoca/crab) then install with python setup.py install.


To make it simple, it is better to classify all of the main experiment components or tools with their associated resources into categorized layers.

System Base

Python, Numpy, and SciPy

Engine or Framework


Dataset Load

Various datasets can be created from scratch or are available from GroupLens; such as MovieLens for movie ratings, HetRec (for Delicious Bookmarks, Last.fm listening records, MovieLens with IMDb/Rotten Tomatoes ratings), Book-Crossing (BX), and Jester jokes list.

Approach Model

Item-based or similarity-based recommender system.

Recommendation Result

Array of possible recommendations.