prea.data.splitter
Class PredefinedSplit

java.lang.Object
  extended by prea.data.splitter.DataSplitManager
      extended by prea.data.splitter.PredefinedSplit

public class PredefinedSplit
extends DataSplitManager

When a predefined split file is available, this class helps to split train/test set as defined in the file. This can be used for verifying implementation of new CF algorithm.

Since:
2012. 4. 20
Version:
1.1
Author:
Joonseok Lee

Field Summary
 
Fields inherited from class prea.data.splitter.DataSplitManager
itemCount, itemRateAverage, K_FOLD_CROSS_VALIDATION, maxValue, minValue, PREDEFINED_SPLIT, rateMatrix, SIMPLE_SPLIT, testMatrix, userCount, userRateAverage
 
Constructor Summary
PredefinedSplit(SparseMatrix originalMatrix, java.lang.String splitFileName, int max, int min)
          Construct an instance for splitter with predefined split file.
 
Method Summary
private  void readSplitData(java.lang.String fileName)
          Split the rating matrix into train and test set, by given split data file.
 
Methods inherited from class prea.data.splitter.DataSplitManager
calculateAverage, getItemRateAverage, getTestMatrix, getUserRateAverage, recoverTestItems
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PredefinedSplit

public PredefinedSplit(SparseMatrix originalMatrix,
                       java.lang.String splitFileName,
                       int max,
                       int min)
Construct an instance for splitter with predefined split file.

Method Detail

readSplitData

private void readSplitData(java.lang.String fileName)
Split the rating matrix into train and test set, by given split data file.

Parameters:
fileName - the name of split data file.