prea.data.preparation
Class SimpleSplit

java.lang.Object
  extended by prea.data.preparation.DatasetManager
      extended by prea.data.preparation.SimpleSplit

public class SimpleSplit
extends DatasetManager

This class helps to split data matrix into train set and test set, based on the test set ratio defined by the user.

Since:
2012. 3. 26
Version:
1.1
Author:
Joonseok Lee

Field Summary
 
Fields inherited from class prea.data.preparation.DatasetManager
itemCount, itemRateAverage, K_FOLD_CROSS_VALIDATION, maxValue, minValue, PREDEFINED_SPLIT, rateMatrix, SIMPLE_SPLIT, testMatrix, userCount, userRateAverage
 
Constructor Summary
SimpleSplit(SparseMatrix originalMatrix, double testRatio, int max, int min)
          Construct an instance for simple splitter.
 
Method Summary
private  void split(double testRatio)
          Items which will be used for test purpose are moved from rateMatrix to testMatrix.
 
Methods inherited from class prea.data.preparation.DatasetManager
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

SimpleSplit

public SimpleSplit(SparseMatrix originalMatrix,
                   double testRatio,
                   int max,
                   int min)
Construct an instance for simple splitter.

Method Detail

split

private void split(double testRatio)
Items which will be used for test purpose are moved from rateMatrix to testMatrix.

Parameters:
testRatio - proportion of items which will be used for test purpose.