CFEngine API

org.recommender.test
Class GetPredictedRatingListTest

java.lang.Object
  |
  +--org.recommender.test.GetPredictedRatingListTest

public class GetPredictedRatingListTest
extends java.lang.Object

Test for getPredictedRatingList()

Author:
Yun Wang

Constructor Summary
GetPredictedRatingListTest(CFEngine s)
           
 
Method Summary
 int fiveItemTest(int user)
          fiveItemTest() Get 10 items (5 existed, 5 randomly), check values.
 int illegalParamTest()
          illegalParamTest() 1.
 int multiUserTest1()
          multiUserTest1() Test 5 users for 20 items: 1.
 int singleItemTest1(int user)
          singleItemTest1() item array length is 1(randomly), compare predicted value with the one in DB
 int singleItemTest2(int user)
          singleItemTest2() item array length is 1 (existed), compare predicted value with the one in DB
 void testSeq()
          testSeq()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetPredictedRatingListTest

public GetPredictedRatingListTest(CFEngine s)
Method Detail

singleItemTest1

public int singleItemTest1(int user)
singleItemTest1() item array length is 1(randomly), compare predicted value with the one in DB

Returns:
int

singleItemTest2

public int singleItemTest2(int user)
singleItemTest2() item array length is 1 (existed), compare predicted value with the one in DB

Returns:
int

fiveItemTest

public int fiveItemTest(int user)
fiveItemTest() Get 10 items (5 existed, 5 randomly), check values. Test in 3 ways:

Returns:
int

multiUserTest1

public int multiUserTest1()
multiUserTest1() Test 5 users for 20 items: 1. get predictions 2. rate the first 3 items, then get predictions 3. remove first 2 ratings and rate last 5 itmes, then get predictions

Returns:
int

illegalParamTest

public int illegalParamTest()
illegalParamTest() 1. item < 1 and item > maxItem 2. user < 1 and user > maxUser 3. item array is null.


testSeq

public void testSeq()
testSeq()


CFEngine API

Copyright © 2003 - Oregon State University www.orst.edu