|
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.SVD_Pearson
Describes an implementation of the CFAlgorithm interface to make CF predictions using the SVD + Pearson correlation 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[][] |
A_original
|
(package private) float[] |
avg_row
|
(package private) java.util.Vector |
SimilarityVector
|
Constructor Summary | |
SVD_Pearson(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)
Predict ratings using nearest neighbor algorithm -- user correlations are based on the Pearson correlations between users' ratings on "features" |
void |
SVD_PearsonOperation()
Compute the Pearson correlations based on users' ratings on "features" |
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 |
java.util.Vector SimilarityVector
float[][] A_original
float[] avg_row
Constructor Detail |
public SVD_Pearson(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 SVD_PearsonOperation()
|
CFEngine API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |