Orange3 Recommendation is a Python module that extends Orange3 to include support for recommender systems. All features can be combined with powerful data mining techniques from the Orange data mining framework.
Orange3-Recommendation is tested to work under Python 3.
The required dependencies to build the software are Numpy >= 1.9.0 and Scikit-Learn >= 0.16
This package uses distutils, which is the default way of installing python modules. To install in your home directory, use::
python setup.py install --user
To install for all users on Unix/Linux::
python setup.py build
sudo python setup.py install
For development mode use::
python setup.py develop
After the installation, the widgets from this add-on are registered with Orange. To run Orange from the terminal, use
python3 -m Orange.canvas
new widgets are in the toolbox bar under Recommendation section.
All modules can be found inside orangecontrib.recommendation.*. Thus, to import all modules we can type:
from orangecontrib.recommendation import *
Rating pairs (user, item):
Let's presume that we want to load a dataset, train it and predict its first three pairs of (id_user, id_item)
>>> import Orange
>>> from orangecontrib.recommendation import BRISMFLearner
>>> data = Orange.data.Table('movielens100k.tab')
>>> learner = BRISMFLearner(K=15, steps=25, alpha=0.07, beta=0.1)
>>> recommender = learner(data)
>>> prediction = recommender(data[:3])
>>> print(prediction)
[ 3.79505151 3.75096513 1.293013 ]
Recommend items for set of users:
Now we want to get all the predictions (all items) for a set of users:
>>> import numpy as np
>>> indices_users = np.array([4, 12, 36])
>>> prediction = recommender.predict_items(indices_users)
>>> print(prediction)
[[ 1.34743879 4.61513578 3.90757263 ..., 3.03535099 4.08221699 4.26139511]
[ 1.16652757 4.5516808 3.9867497 ..., 2.94690548 3.67274108 4.1868596 ]
[ 2.74395768 4.04859096 4.04553826 ..., 3.22923456 3.69682699 4.95043435]]
MovieLens100K: (Loading time: 0.428s)
Algorithm | RMSE | MAE | Train time | Settings |
---|---|---|---|---|
Global Average | 1.126 | - | 0.001s | - |
Item Average | 1.000 | - | 0.001s | - |
User Average | 1.031 | - | 0.001s | - |
User-Item Baseline | 0.938 | - | 0.001s | - |
BRISMF | 0.823 | - | 1.453s/iter | k=15; alpha=0.07; beta=0.1 |
SVD++ | 0.836 | - | 7.991s/iter | k=15; alpha=0.07; beta=0.1 |
MovieLens1M: (Loading time: 4.535s)
Algorithm | RMSE | MAE | Train time | Settings |
---|---|---|---|---|
Global Average | 1.117 | - | 0.010s | - |
Item Average | 0.975 | - | 0.018s | - |
User Average | 1.028 | - | 0.021s | - |
User-Item Baseline | 0.924 | - | 0.027s | - |
BRISMF | 0.872 | - | 14.347s/iter | k=15; alpha=0.07; beta=0.1 |
SVD++ | 0.896 | - | 114.665s/iter | k=15; alpha=0.07; beta=0.1 |
MovieLens10M: (Loading time: 49.804s)
Algorithm | RMSE | MAE | Train time | Settings |
---|---|---|---|---|
Global Average | 1.060 | - | 0.129s | - |
Item Average | 0.942 | - | 0.256s | - |
User Average | 0.970 | - | 0.256s | - |
User-Item Baseline | 0.877 | - | 0.361s | - |
BRISMF | 0.841 | - | 138.309s/iter | k=15; alpha=0.07; beta=0.1 |
- Official source code repo: https://github.com/salvacarrion/orange3-recommendation
- HTML documentation: http://orange3-recommendation.readthedocs.io
- Download releases: https://github.com/salvacarrion/orange3-recommendation/releases
- Issue tracker: https://github.com/salvacarrion/orange3-recommendation/issues