Skip to content

Recommender Algorithms

Lucio Paiva edited this page Jun 1, 2015 · 2 revisions

There are currently four recommender algorithms (or "specialists"), and three merge strategies (or "hybrid algorithms") available.

Specialists:

  • UBCF (User-Based Collaborative Filtering)
  • PBCF (Product-Based Collaborative Filtering)
  • CB (Content-Based)
  • POP (Popularity)

Hybrid algorithms:

  • HRChunks
  • HRRandom
  • HRVoting

UBCF

Roughly speaking, the user-based collaborative filtering ranks items based on previous activities (or "consumption patterns") of like-minded users. When recommending products for a given target user Alice, the UBCF specialist first gathers the COUNT_USER_TEMPLATES users whose recently viewed (or bought, or read, etc., according to the client settings) products maximize the likelihood of being interesting to Alice. Such like-minded users are refered to as user templates. The most recent 5-star-rated products of each user template are then scored according to the "degree of templateness" (or simply the strength) of each user template with respect to Alice. The number of user templates to be considered corresponds to an entry in barbante/config/barbante_<client_name>.yml file. The strength of each user U in the system as a user template for Alice is obtained as the probability (inferred by observing historical data of both U and Alice) that products rated high by U (and with impressions to Alice) are also rated high by Alice.

PBCF

The Product-Based collaborative filtering works as follows. Each of the COUNT_RECENT_PRODUCTS most recently consumed (implicitly rated "high enough") products of our target user Alice is regarded as a base product. For each base product, the algorithm gathers the COUNT_PRODUCT_TEMPLATES products which maximize the probabilities of being interesting to other users who rated high said base product. Such probabilities are inferred based on historical data of all users in the client system. As expected, the number of base products and of templates of base products are configured as entries in barbante/config/barbante_<client_name>.yml file.

CB

The Content-Based specialist works to some extent analogously to the PBCF, for it also retrieves a number of base products of the target user. Only now the template products of each base product will be those which are most intrinsically similar to the base product. The degree of similarity is obtained by the weighted comparison of each relevant attribute. Text attributes are compared using an original algorithm (based on "asymmetric debts") to be published soon.

POP

The simplest specialist is the Popularity recommender, which ranks items based on their "popularity density", that is, based on how many users have rated each item high enough divided by the time span (in days) during which the activities on that item have occurred.

HRChunks

The first hybrid recommender merges the four specialists above in such a way that each specialist's items occupy a fixed chunk (number of slots) in the overall ranking of items. These chunks are circularly repeated until the items of all specialists have been exhausted (or the intended number of recommendations has been reached). The size of each chunk is defined according to the weights assigned to each specialist in the ALGORITHM_WEIGHTS section in barbante/config/barbante_<client_name>.yml file.

HRRandom

The second hybrid recommender merges the four specialists in random fashion. For each "product slot" in the overall ranking being built, it chooses randomly the topmost item of one of the specialists, removing it from that specialist's queue. The probability to choose each of the specialists conforms to the weight assigned to it in the ALGORITHM_WEIGHTS section in barbante/config/barbante_<client_name>.yml file.

HRVoting

The third hybrid recommender --- which seems to be the one with most interesting results --- employs a voting system to combine the rankings of all specialists. The ranking produced by each specialist is first used to assign scores for each product in a Formula 1 fashion: the first item gets a number of points, the runner-up gets less points, and so on. A negative exponential function is applied to determine the number of points each position in the ranking deserves. The points given to a same item by more than one specialist are summed up, but not until they have been multiplied by the appropriate specialist weight, as configured in the ALGORITHM_WEIGHTS section in barbante/config/barbante_<client_name>.yml file.

Clone this wiki locally