Last active
August 29, 2015 14:02
-
-
Save vtomiris/66237709de440be7587c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.grouplens.lenskit.knn.item.* | |
import org.grouplens.lenskit.transform.normalize.* | |
import org.grouplens.lenskit.eval.metrics.topn.*; | |
trainTest { | |
dataset crossfold("ml-100k") { | |
source csvfile("ml-100k/u.data"){ // relative (or absolute) path to the dataset. In the current format, it assumes that you have a folder named "ml-100k" containing the "u.data" file | |
delimiter "\t" | |
domain { | |
minimum 1.0 | |
maximum 5.0 | |
precision 1.0 | |
} | |
} | |
} | |
algorithm("PersMean") { | |
bind ItemScorer to UserMeanItemScorer | |
bind (UserMeanBaseline, ItemScorer) to ItemMeanRatingItemScorer | |
} | |
metric RMSEPredictMetric | |
metric topNnDCG { | |
listSize 10 | |
candidates ItemSelectors.allItems() | |
exclude ItemSelectors.trainingItems() | |
} | |
output "eval-results.csv" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment