[% title='MyMediaLite: How to use a recommender in Python' prefix='../' %] [% INCLUDE header %]

[% title %]

[% INCLUDE menu %] [% INCLUDE infobox %]

On this page, we show how to first set up recommenders in Python, and then use them to make predictions.

To use the examples on this page, download the MovieLens 100k ratings dataset from the GroupLens Research website and unzip it.
Of course you can also use your own data ;-)

IronPython

[% INCLUDE link link='ironpython' %] lets you run Python programs on the .NET platform. It also lets you use .NET libraries (.dlls) like MyMediaLite.

To run a program with IronPython, type ipy program.py in the command line, where program.py is your program.

You may also enter just ipy, so that you can use IronPython's REPL interactively.

Our examples do not work with IronPython 2.6. Use IronPython 3.0 instead.

Rating Prediction

[% INSERT 'rating_prediction.py' %]

Item Prediction from Positive-Only Feedback

[% INSERT 'item_recommendation.py' %]

[% INCLUDE footer %]