class_docstr: Indexable Bayesian Personalized Ranking.
  
  Parameters
  ----------
  k: int, optional, default: 20
      The dimension of the latent factors.
  
  max_iter: int, optional, default: 100
      Maximum number of iterations or the number of epochs for SGD.
  
  learning_rate: float, optional, default: 0.05
      The learning rate for SGD.
  
  lamda: float, optional, default: 0.001
      The regularization parameter.
  
  batch_size: int, optional, default: 100
      The batch size for SGD.
  
  name: string, optional, default: 'IBRP'
      The name of the recommender model.
  
  trainable: boolean, optional, default: True
      When False, the model is not trained and Cornac assumes that the model already         pre-trained (U and V are not None).
      
  verbose: boolean, optional, default: False
      When True, some running logs are displayed.
  
  init_params: dictionary, optional, default: None
      List of initial parameters, e.g., init_params = {'U':U, 'V':V}         please see below the definition of U and V.
  
      U: csc_matrix, shape (n_users,k)
          The user latent factors, optional initialization via init_params.
  
      V: csc_matrix, shape (n_items,k)
          The item latent factors, optional initialization via init_params.
  
  References
  ----------
  * Le, D. D., & Lauw, H. W. (2017, November). Indexable Bayesian personalized ranking for efficient top-k recommendation.      In Proceedings of the 2017 ACM on Conference on Information and Knowledge Management (pp. 1389-1398). ACM.
class_docstr_tok: ["Indexable","Bayesian","Personalized","Ranking",".","Parameters","--","--","--","--","--","k",":","int",",","optional",",","default",":","20","The","dimension","of","the","latent","factors",".","max_iter",":","int",",","optional",",","default",":","100","Maximum","number","of","iterations","or","the","number","of","epochs","for","SGD",".","learning_rate",":","float",",","optional",",","default",":","0.05","The","learning","rate","for","SGD",".","lamda",":","float",",","optional",",","default",":","0.001","The","regularization","parameter",".","batch_size",":","int",",","optional",",","default",":","100","The","batch","size","for","SGD",".","name",":","string",",","optional",",","default",":","'IBRP'","The","name","of","the","recommender","model",".","trainable",":","boolean",",","optional",",","default",":","True","When","False",",","the","model","is","not","trained","and","Cornac","assumes","that","the","model","already","pre-trained","(","U","and","V","are","not","None",")",".","verbose",":","boolean",",","optional",",","default",":","False","When","True",",","some","running","logs","are","displayed",".","init_params",":","dictionary",",","optional",",","default",":","None","List","of","initial","parameters",",","e.g.",",","init_params","=","{","'","U","'",":","U",",","'","V","'",":","V","}","please","see","below","the","definition","of","U","and","V.","U",":","csc_matrix",",","shape","(","n_users",",","k",")","The","user","latent","factors",",","optional","initialization","via","init_params",".","V",":","csc_matrix",",","shape","(","n_items",",","k",")","The","item","latent","factors",",","optional","initialization","via","init_params",".","References","--","--","--","--","--","*","Le",",","D.","D.",",","&","Lauw",",","H.","W.","(","2017",",","November",")",".","Indexable","Bayesian","personalized","ranking","for","efficient","top-k","recommendation",".","In","Proceedings","of","the","2017","ACM","on","Conference","on","Information","and","Knowledge","Management","(","pp",".","1389-1398",")",".","ACM","."]
code: def __init__(
      self,
      k=20,
      max_iter=100,
      learning_rate=0.05,
      lamda=0.001,
      batch_size=100,
      name="IBPR",
      trainable=True,
      verbose=False,
      init_params=None,
  ):
      Recommender.__init__(
          self, name=name, trainable=trainable, verbose=verbose
      )
      self.k = k
      self.max_iter = max_iter
      self.name = name
      self.learning_rate = learning_rate
      self.lamda = lamda
      self.batch_size = batch_size
  
      self.init_params = {} if init_params is None else init_params
      self.U = self.init_params.get("U", None)  # matrix of user factors
      self.V = self.init_params.get("V", None)
  
file_path: cornac/cornac/models/ibpr/recom_ibpr.py
imports: import numpy
  from ..recommender import Recommender
  from ..recommender import ANNMixin, MEASURE_DOT
  from ...exception import ScoreException
label_desc: Use image node_id 1 to create a new IBPR object from inherited base classes: Recommender, ANNMixin with example: obj = IBPR(k, max_iter, learning_rate, lamda, batch_size, name, trainable, verbose, init_params)