|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectprea.main.Prea
public class Prea
The main class of this toolkit. It includes loading the dataset, splitting train/test set, and interface to evaluation for each algorithms.
Field Summary | |
---|---|
static java.lang.String |
algorithmCode
The code for an algorithm which will run. |
static java.lang.String[] |
algorithmParameters
Parameter list for the algorithm to run. |
static java.lang.String[] |
columnName
The list of item names, provided with the dataset. |
static java.lang.String |
dataFileName
The name of data file used for test. |
static int |
evaluationMode
Evaluation mode |
static int |
foldCount
The number of folds when k-fold cross-validation is used. |
static int |
itemCount
The number of items. |
static SparseVector |
itemRateAverage
Average of ratings for each item. |
static boolean |
itemSimilarityPrefetch
Indicating whether loading pre-calculated item similarity file or not |
static int |
maxValue
Maximum value of rating, existing in the dataset. |
static int |
minValue
Minimum value of rating, existing in the dataset. |
static SparseMatrix |
rateMatrix
Rating matrix for each user (row) and item (column) |
static boolean |
runAllAlgorithms
Indicating whether to run all algorithms. |
static java.lang.String |
splitFileName
The name of predefined split data file. |
static SparseMatrix |
testMatrix
Rating matrix for test items. |
static double |
testRatio
Proportion of items which will be used for test purpose. |
static int |
userCount
The number of users. |
static SparseVector |
userRateAverage
Average of ratings for each user. |
static boolean |
userSimilarityPrefetch
Indicating whether loading pre-calculated user similarity file or not |
Constructor Summary | |
---|---|
Prea()
|
Method Summary | |
---|---|
static void |
main(java.lang.String[] argv)
Test examples for every algorithm. |
private static void |
parseCommandLine(java.lang.String[] command)
Parse the command from user. |
private static void |
readArff(java.lang.String fileName)
Read the data file in ARFF format, and store it in rating matrix. |
private static void |
run()
Run an/all algorithm with given data, based on the setting from command arguments. |
static void |
runAll()
Run all algorithms with given data. |
static void |
runIndividual(java.lang.String algorithmCode,
java.lang.String[] parameters)
Run one algorithm with customized parameters with given data. |
static java.lang.String |
testRecommender(java.lang.String algorithmName,
Recommender r)
Test interface for a recommender system. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String dataFileName
public static int evaluationMode
public static double testRatio
public static java.lang.String splitFileName
public static int foldCount
public static boolean runAllAlgorithms
public static java.lang.String algorithmCode
public static java.lang.String[] algorithmParameters
public static boolean userSimilarityPrefetch
public static boolean itemSimilarityPrefetch
public static SparseMatrix rateMatrix
public static SparseMatrix testMatrix
public static SparseVector userRateAverage
public static SparseVector itemRateAverage
public static int userCount
public static int itemCount
public static int maxValue
public static int minValue
public static java.lang.String[] columnName
Constructor Detail |
---|
public Prea()
Method Detail |
---|
public static void main(java.lang.String[] argv)
argv
- The argument list. Each element is separated by an empty space.
First element is the data file name, and second one is the algorithm name.
Third and later includes parameters for the chosen algorithm.
Please refer to our web site for detailed syntax.private static void run()
private static void parseCommandLine(java.lang.String[] command)
command
- The command string given by user.public static java.lang.String testRecommender(java.lang.String algorithmName, Recommender r)
public static void runIndividual(java.lang.String algorithmCode, java.lang.String[] parameters)
public static void runAll()
private static void readArff(java.lang.String fileName)
fileName
- The name of data file.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |