prea.recommender
Class UnitTest
java.lang.Object
prea.recommender.UnitTest
public class UnitTest
- extends java.lang.Object
A unit test module for user-defined custom recommenders.
- Since:
- 2012. 4. 20
- Version:
- 1.1
- Author:
- Joonseok Lee
Method Summary |
void |
check()
Verify whether the recommender implemented correctly.
1) Check whether the recommender illegally alters train data.
2) Check whether the recommender illegally alters test data.
3) Compare to several baselines, which should beat in general. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
usedRateMatrix
private SparseMatrix usedRateMatrix
usedTestMatrix
private SparseMatrix usedTestMatrix
preservedRateMatrix
private SparseMatrix preservedRateMatrix
preservedTestMatrix
private SparseMatrix preservedTestMatrix
targetRecommender
private Recommender targetRecommender
UnitTest
public UnitTest(Recommender r,
SparseMatrix rm,
SparseMatrix tm)
- Construct an instance of unit test module.
- Parameters:
r
- The recommender to be tested.rm
- The rating matrix with train data.tm
- The rating matrix with test data.
check
public void check()
- Verify whether the recommender implemented correctly.
1) Check whether the recommender illegally alters train data.
2) Check whether the recommender illegally alters test data.
3) Compare to several baselines, which should beat in general.