|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mymedialite.ensemble.Ensemble
public abstract class Ensemble
Abstract class for combining several prediction methods.
Field Summary | |
---|---|
java.util.List<IRecommender> |
recommenders
List of recommenders. |
Constructor Summary | |
---|---|
Ensemble()
|
Method Summary | |
---|---|
boolean |
canPredict(int user_id,
int item_id)
Check whether a useful prediction can be made for a given user-item combination. |
java.lang.Object |
clone()
Create a shallow copy of the object. |
double |
getMaxRatingValue()
The max rating value. |
double |
getMinRatingValue()
The min rating value. |
abstract void |
loadModel(java.lang.String filename)
Get the model parameters from a file |
abstract double |
predict(int user_id,
int item_id)
Predict the rating or score for a given user-item combination. |
abstract void |
saveModel(java.lang.String filename)
Save the model parameters to a file |
void |
setMaxRatingValue(double value)
|
void |
setMinRatingValue(double value)
|
void |
train()
Learn the model parameters of the recommender from the training data |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.mymedialite.IRecommender |
---|
toString |
Field Detail |
---|
public java.util.List<IRecommender> recommenders
Constructor Detail |
---|
public Ensemble()
Method Detail |
---|
public java.lang.Object clone()
clone
in class java.lang.Object
public double getMaxRatingValue()
public void setMaxRatingValue(double value)
public double getMinRatingValue()
public void setMinRatingValue(double value)
public abstract double predict(int user_id, int item_id)
IRecommender
predict
in interface IRecommender
user_id
- the user IDitem_id
- the item ID
public boolean canPredict(int user_id, int item_id)
IRecommender
canPredict
in interface IRecommender
user_id
- the user IDitem_id
- the item ID
public abstract void saveModel(java.lang.String filename) throws java.io.IOException
IRecommender
saveModel
in interface IRecommender
filename
- the file to write to
java.io.IOException
public abstract void loadModel(java.lang.String filename) throws java.io.IOException
IRecommender
loadModel
in interface IRecommender
filename
- the file to read from
java.io.IOException
public void train()
IRecommender
train
in interface IRecommender
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |