|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mymedialite.ratingprediction.RatingPredictor
org.mymedialite.ratingprediction.CoClustering
public class CoClustering
Co-clustering for rating prediction. Literature: Thomas George, Srujana Merugu A Scalable Collaborative Filtering Framework based on Co-clustering. ICDM 2005. http://hercules.ece.utexas.edu/~srujana/papers/icdm05.pdf This recommender does NOT support incremental updates.
Field Summary | |
---|---|
int |
numItemClusters
The number of item clusters. |
int |
numIter
The maximum number of iterations. |
int |
numUserClusters
The number of user clusters. |
Fields inherited from class org.mymedialite.ratingprediction.RatingPredictor |
---|
maxItemID, maxRating, maxUserID, minRating, ratings |
Constructor Summary | |
---|---|
CoClustering()
Default constructor. |
Method Summary | |
---|---|
double |
computeLoss()
Compute the current loss of the model |
int |
getNumIter()
Get the number of iterations to run the training |
void |
initModel()
|
void |
iterate()
Run one iteration (= pass over the training data) |
void |
loadModel(java.lang.String filename)
Get the model parameters from a file |
double |
predict(int u,
int i)
Predict the rating or score for a given user-item combination. |
void |
saveModel(java.lang.String filename)
Save the model parameters to a file |
void |
setNumIter(int numIter)
Set the number of iterations to run the training |
java.lang.String |
toString()
Return a string representation of the recommender |
void |
train()
Learn the model parameters of the recommender from the training data |
Methods inherited from class org.mymedialite.ratingprediction.RatingPredictor |
---|
canPredict, clone, getMaxRating, getMinRating, getRatings, setMaxRating, setMinRating, setRatings |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int numUserClusters
public int numItemClusters
public int numIter
Constructor Detail |
---|
public CoClustering()
Method Detail |
---|
public void setNumIter(int numIter)
IIterativeModel
setNumIter
in interface IIterativeModel
public int getNumIter()
IIterativeModel
getNumIter
in interface IIterativeModel
public void initModel()
public void iterate()
IIterativeModel
iterate
in interface IIterativeModel
public void train()
IRecommender
train
in interface IRecommender
train
in class RatingPredictor
public double predict(int u, int i)
IRecommender
predict
in interface IRecommender
predict
in class RatingPredictor
u
- the user IDi
- the item ID
public void saveModel(java.lang.String filename) throws java.io.IOException
IRecommender
saveModel
in interface IRecommender
saveModel
in class RatingPredictor
filename
- the file to write to
java.io.IOException
public void loadModel(java.lang.String filename) throws java.io.IOException
IRecommender
loadModel
in interface IRecommender
loadModel
in class RatingPredictor
filename
- the file to read from
java.io.IOException
public double computeLoss()
IIterativeModel
computeLoss
in interface IIterativeModel
public java.lang.String toString()
IRecommender
toString
in interface IRecommender
toString
in class RatingPredictor
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |