org.mymedialite.itemrec
Class IncrementalItemRecommender
java.lang.Object
org.mymedialite.itemrec.ItemRecommender
org.mymedialite.itemrec.IncrementalItemRecommender
- All Implemented Interfaces:
- java.lang.Cloneable, IRecommender, IIncrementalItemRecommender
- Direct Known Subclasses:
- MF, MostPopular
public abstract class IncrementalItemRecommender
- extends ItemRecommender
- implements IIncrementalItemRecommender
Base class for item recommenders that support incremental updates.
Method Summary |
void |
addFeedback(int user_id,
int item_id)
add a new positive feedback event |
protected void |
addItem(int item_id)
|
protected void |
addUser(int user_id)
|
void |
removeFeedback(int user_id,
int item_id)
remove all positive feedback events with that user-item combination |
void |
removeItem(int item_id)
remove all feedback for one item |
void |
removeUser(int user_id)
remove all feedback by one user |
Methods inherited from class org.mymedialite.itemrec.ItemRecommender |
canPredict, clone, getFeedback, loadModel, loadModel, predict, saveModel, saveModel, setFeedback, toString, train |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
IncrementalItemRecommender
public IncrementalItemRecommender()
addFeedback
public void addFeedback(int user_id,
int item_id)
- Description copied from interface:
IIncrementalItemRecommender
- add a new positive feedback event
- Specified by:
addFeedback
in interface IIncrementalItemRecommender
- Parameters:
user_id
- the user IDitem_id
- the item ID
removeFeedback
public void removeFeedback(int user_id,
int item_id)
- Description copied from interface:
IIncrementalItemRecommender
- remove all positive feedback events with that user-item combination
- Specified by:
removeFeedback
in interface IIncrementalItemRecommender
- Parameters:
user_id
- the user IDitem_id
- the item ID
addUser
protected void addUser(int user_id)
addItem
protected void addItem(int item_id)
removeUser
public void removeUser(int user_id)
- Description copied from interface:
IIncrementalItemRecommender
- remove all feedback by one user
- Specified by:
removeUser
in interface IIncrementalItemRecommender
- Parameters:
user_id
- the user ID
removeItem
public void removeItem(int item_id)
- Description copied from interface:
IIncrementalItemRecommender
- remove all feedback for one item
- Specified by:
removeItem
in interface IIncrementalItemRecommender
- Parameters:
item_id
- the item ID