|
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.VectorSimilarityAlgorithm
Describes an implementation of the CFAlgorithm interface to make CF predictions using the vector similarity method. Includes an implementation of inverse user frequency weighting from Breese et al 1998, but it doesn't help and isn't recommended. May be buggy.
Constructor Summary | |
VectorSimilarityAlgorithm(DataManager dataMgr)
Constructor. |
Method Summary | |
long |
getAveragePredictionTime()
Return average prediction time. |
ItemPrediction[] |
getRecommendations(int activeUser,
int n)
Not yet complete |
ItemPrediction[] |
getRecommendationsByType(int activeUser,
int n,
int type)
Not yet complete |
SimilarityWeight |
getWeightIUF(int activeUser,
int neighbor)
Calculate weight between two users using inverse user frequency. |
ItemPrediction |
predictRating(int activeUser,
int item)
Predict rating for activeUser' item. |
java.lang.String |
toString()
Return the name of this algorithm. |
void |
updateUser(int userID)
Not yet complete. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public VectorSimilarityAlgorithm(DataManager dataMgr)
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 long getAveragePredictionTime() throws CFNotImplementedException
getAveragePredictionTime
in interface CFAlgorithm
CFNotImplementedException
public SimilarityWeight getWeightIUF(int activeUser, int neighbor)
activeUser
- neighbor
-
public void updateUser(int userID) throws CFNotImplementedException
updateUser
in interface CFAlgorithm
userID
-
CFNotImplementedException
public java.lang.String toString()
toString
in interface CFAlgorithm
toString
in class java.lang.Object
|
CFEngine API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |