A bipartite factorisation machine with a modified WARP loss [1] for hybrid recommendation, written in Cython. Once used at Lateral for recommendation at scale. No longer maintained.
Hybrid recommendation is the combination of content- and behavioural- information in a recommendation model. Thus when an item is to be recommended depends not on who has interacted with it, but also on its content (e.g. words in its description, its tags, etc).
The implementation deviates from the standard in that it uses a sigmoid activation, a multiplicative margin, and a log-likelihood style updates. These modifications were justified by (unpublished, internal) performance improvements on customer datasets.
In addition, we use a modification of Adagrad that works at the feature vector level, instead of at the level of coordinates. This greatly reduces the number of Adagrad parameters and moreover makes the optimisation independent of the choice of coordinate axes.
- Python >= 3.5
- Cython == 0.25.2
See also requirements.txt
.
Only tested on Ubuntu 16.04.
./install
A Jupyter notebook gives example usage.
Unfortunately, we are not able to maintain this repository and provide intensive support on the use of this software. If you've any short questions, however, we'd be pleased to help (contact user@domain where user=benjamin
and domain=lateral.io
).
- The excellent LightFM, written by Maciej Kula.
[1] Weston, Jason, Samy Bengio, and Nicolas Usunier. "Wsabie: Scaling up to large vocabulary image annotation." IJCAI. Vol. 11. 2011.