org.mymedialite.itemrec
Class WeightedBPRMF

java.lang.Object
  extended by org.mymedialite.itemrec.ItemRecommender
      extended by org.mymedialite.itemrec.IncrementalItemRecommender
          extended by org.mymedialite.itemrec.MF
              extended by org.mymedialite.itemrec.BPRMF
                  extended by org.mymedialite.itemrec.WeightedBPRMF
All Implemented Interfaces:
java.lang.Cloneable, IIterativeModel, IRecommender, IIncrementalItemRecommender

public class WeightedBPRMF
extends BPRMF

Weighted BPR-MF with frequency-adjusted sampling. Literature: Zeno Gantner, Lucas Drumond, Christoph Freudenthaler, Lars Schmidt-Thieme: Bayesian Personalized Ranking for Non-Uniformly Sampled Items. KDD Cup Workshop 2011


Field Summary
protected  int[] items
          array of item IDs of positive user-item pairs.
protected  int[] users
          array of user IDs of positive user-item pairs.
 
Fields inherited from class org.mymedialite.itemrec.BPRMF
biasReg, boldDriver, fastSampling, fastSamplingMemoryLimit, itemBias, learnRate, random, regI, regJ, regU, uniformUserSampling, updateJ, userNegItems, userPosItems, withReplacement
 
Fields inherited from class org.mymedialite.itemrec.MF
initMean, initStDev, itemFactors, numFactors, numIter, userFactors
 
Fields inherited from class org.mymedialite.itemrec.ItemRecommender
feedback, maxItemID, maxUserID
 
Constructor Summary
WeightedBPRMF()
          Default constructor.
 
Method Summary
protected  void sampleTriple(org.mymedialite.itemrec.WeightedBPRMF.SampleTriple t)
           
 java.lang.String toString()
          Return a string representation of the recommender
 void train()
          { @inheritDoc }
 
Methods inherited from class org.mymedialite.itemrec.BPRMF
addFeedback, addItem, addUser, checkSampling, computeFit, computeLoss, createFastSamplingData, initModel, iterate, loadModel, loadModel, predict, removeFeedback, removeItem, removeUser, retrainItem, retrainUser, sampleItemPair, sampleOtherItem, sampleTriple, sampleUser, saveModel, saveModel, updateFactors
 
Methods inherited from class org.mymedialite.itemrec.MF
getItemFactors, getNumIter, getUserFactors, setNumIter
 
Methods inherited from class org.mymedialite.itemrec.ItemRecommender
canPredict, clone, getFeedback, setFeedback
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mymedialite.IRecommender
canPredict
 

Field Detail

users

protected int[] users
array of user IDs of positive user-item pairs.


items

protected int[] items
array of item IDs of positive user-item pairs.

Constructor Detail

WeightedBPRMF

public WeightedBPRMF()
Default constructor.

Method Detail

train

public void train()
Description copied from class: BPRMF
{ @inheritDoc }

Specified by:
train in interface IRecommender
Overrides:
train in class BPRMF

sampleTriple

protected void sampleTriple(org.mymedialite.itemrec.WeightedBPRMF.SampleTriple t)

toString

public java.lang.String toString()
Description copied from interface: IRecommender
Return a string representation of the recommender

Specified by:
toString in interface IRecommender
Overrides:
toString in class BPRMF
Returns:
the class name and all hyperparameters, separated by space characters.