|
CFEngine API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.recommender.algorithms.Experimental.SimpleSVD
Describes an implementation of the CFAlgorithm interface to make CF predictions using the Simple SVD method. This is just an experimentally testing algorithm, and only the predictRating method is implemented. Some parameters are hard-coded. If you want to test this algorithm yourself, please change the parameters accordingly. Default paramters: number of users: 943 number of items: 1682 number of training ratings: 80000 number of test ratings: 20000
Field Summary | |
(package private) float[][] |
result
|
Constructor Summary | |
SimpleSVD(DataManager mgr)
Constructor, simply assigns DataManager. |
Method Summary | |
long |
getAveragePredictionTime()
Not implemented |
ItemPrediction[] |
getRecommendations(int activeUser,
int n)
Not implemented |
ItemPrediction[] |
getRecommendationsByType(int activeUser,
int n,
int type)
Not implemented |
ItemPrediction |
predictRating(int activeUser,
int item)
Simply return the rating in the SVD-reduced matrix |
void |
SimpleSVDOperation()
Construct the SVD-reduced matrix |
java.lang.String |
toString()
return the name of this algorithm |
void |
updateUser(int userID)
Not implemented |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
float[][] result
Constructor Detail |
public SimpleSVD(DataManager mgr)
mgr
- Method Detail |
public ItemPrediction[] getRecommendationsByType(int activeUser, int n, int type) throws java.sql.SQLException, CFNotImplementedException
getRecommendationsByType
in interface CFAlgorithm
activeUser
- n
- type
-
java.sql.SQLException
CFNotImplementedException
public ItemPrediction[] getRecommendations(int activeUser, int n) throws java.sql.SQLException, CFNotImplementedException
getRecommendations
in interface CFAlgorithm
activeUser
- n
-
java.sql.SQLException
CFNotImplementedException
public ItemPrediction predictRating(int activeUser, int item) throws CFNotImplementedException
predictRating
in interface CFAlgorithm
activeUser
- item
-
CFNotImplementedException
public void updateUser(int userID) throws CFNotImplementedException
updateUser
in interface CFAlgorithm
userID
-
CFNotImplementedException
public long getAveragePredictionTime() throws CFNotImplementedException
getAveragePredictionTime
in interface CFAlgorithm
CFNotImplementedException
public java.lang.String toString()
toString
in interface CFAlgorithm
toString
in class java.lang.Object
public void SimpleSVDOperation()
|
CFEngine API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |