It will be a ClojureCLR library for MyMediaLite, simple and fast recommender system. Visit their homepage: http://www.ismll.uni-hildesheim.de/mymedialite/index.html .
Contact: @timgluz twitter or just send e-mailgmail.com
I expect that you already have installed given tools&libraries:
-
ClojureCLR - https://github.com/clojure/clojure-clr
-
Lein2Clr - https://github.com/kumarshantanu/lein-clr
Tested on OsX10.6, Mono3. should work also on Windows and Linux.
- Clone this project:
git clone https://github.com/timgluz/clj-mml.git
- Download example data:
curl --remote-name http://www.grouplens.org/system/files/ml-100k.zip && unzip ml-100k.zip
- Rename ml-100k directory to data:
mv ml-100k data
- Run tests:
lein clr test lein clr test clj-mml.test-ratingprediction
- Run project:
lein clr run -m clj-mml.core data/u1.base lein clr run data/u1.base
(ns clj-mml.examples.sugarexample
(:require [clj-mml.recommenders.itemrecommendation :as itemrecommendation]
[clj-mml.recommenders.ratingprediction :as ratingprediction])
(:use [clj-mml.recommenders.recommender]))
(def training-file "data/u1.base")
(def test-file "data/u1.test")
(def oracle (itemrecommendation/init :MostPopular))
(def delphi (ratingprediction/init :UserAverage))
;;train recommenders
(train oracle training-file)
(train delphi [[1 1 4.0][1 2 5.0][1 3 4.0]])
(can-predict? delphi 1 1)
(predict delphi 1 1)
(recommend oracle 1 -1 [100 101] [100 101 102 103 104 105])
(evaluate oracle test-file training-file)
(evaluate delphi test-file training-file)
Check out Starter-MML to fasten up starting new project.
Copyright © 2012 TimGluz
Distributed under the Eclipse Public License, the same as Clojure.