class_docstr: Visual Bayesian Personalized Ranking.
  
  Parameters
  ----------
  k: int, optional, default: 10
      The dimension of the gamma latent factors.
  
  k2: int, optional, default: 10
      The dimension of the theta latent factors.
  
  n_epochs: int, optional, default: 20
      Maximum number of epochs for SGD.
  
  batch_size: int, optional, default: 100
      The batch size for SGD.
  
  learning_rate: float, optional, default: 0.001
      The learning rate for SGD.
  
  lambda_w: float, optional, default: 0.01
      The regularization hyper-parameter for latent factor weights.
  
  lambda_b: float, optional, default: 0.01
      The regularization hyper-parameter for biases.
  
  lambda_e: float, optional, default: 0.0
      The regularization hyper-parameter for embedding matrix E and beta prime vector.
  
  use_gpu: boolean, optional, default: True
      Whether or not to use GPU to speed up training.
  
  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: True
      When True, running logs are displayed.
  
  init_params: dictionary, optional, default: None
      Initial parameters, e.g., init_params = {'Bi': beta_item, 'Gu': gamma_user,
      'Gi': gamma_item, 'Tu': theta_user, 'E': emb_matrix, 'Bp': beta_prime}
  
  seed: int, optional, default: None
      Random seed for weight initialization.
  
  References
  ----------
  * He, R., & McAuley, J. (2016). VBPR: Visual Bayesian Personalized Ranking from Implicit Feedback.
class_docstr_tok: ["Visual","Bayesian","Personalized","Ranking",".","Parameters","--","--","--","--","--","k",":","int",",","optional",",","default",":","10","The","dimension","of","the","gamma","latent","factors",".","k2",":","int",",","optional",",","default",":","10","The","dimension","of","the","theta","latent","factors",".","n_epochs",":","int",",","optional",",","default",":","20","Maximum","number","of","epochs","for","SGD",".","batch_size",":","int",",","optional",",","default",":","100","The","batch","size","for","SGD",".","learning_rate",":","float",",","optional",",","default",":","0.001","The","learning","rate","for","SGD",".","lambda_w",":","float",",","optional",",","default",":","0.01","The","regularization","hyper-parameter","for","latent","factor","weights",".","lambda_b",":","float",",","optional",",","default",":","0.01","The","regularization","hyper-parameter","for","biases",".","lambda_e",":","float",",","optional",",","default",":","0.0","The","regularization","hyper-parameter","for","embedding","matrix","E","and","beta","prime","vector",".","use_gpu",":","boolean",",","optional",",","default",":","True","Whether","or","not","to","use","GPU","to","speed","up","training",".","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",":","True","When","True",",","running","logs","are","displayed",".","init_params",":","dictionary",",","optional",",","default",":","None","Initial","parameters",",","e.g.",",","init_params","=","{","'Bi","'",":","beta_item",",","'Gu","'",":","gamma_user",",","'Gi","'",":","gamma_item",",","'Tu","'",":","theta_user",",","'","E","'",":","emb_matrix",",","'Bp","'",":","beta_prime","}","seed",":","int",",","optional",",","default",":","None","Random","seed","for","weight","initialization",".","References","--","--","--","--","--","*","He",",","R.",",","&","McAuley",",","J",".","(","2016",")",".","VBPR",":","Visual","Bayesian","Personalized","Ranking","from","Implicit","Feedback","."]
code: def __init__(
      self,
      name="VBPR",
      k=10,
      k2=10,
      n_epochs=50,
      batch_size=100,
      learning_rate=0.005,
      lambda_w=0.01,
      lambda_b=0.01,
      lambda_e=0.0,
      use_gpu=False,
      trainable=True,
      verbose=True,
      init_params=None,
      seed=None,
  ):
      super().__init__(name=name, trainable=trainable, verbose=verbose)
      self.k = k
      self.k2 = k2
      self.n_epochs = n_epochs
      self.batch_size = batch_size
      self.learning_rate = learning_rate
      self.lambda_w = lambda_w
      self.lambda_b = lambda_b
      self.lambda_e = lambda_e
      self.use_gpu = use_gpu
      self.seed = seed
  
      # Init params if provided
      self.init_params = {} if init_params is None else init_params
      self.beta_item = self.init_params.get("Bi", None)
      self.gamma_user = self.init_params.get("Gu", None)
      self.gamma_item = self.init_params.get("Gi", None)
      self.theta_user = self.init_params.get("Tu", None)
      self.emb_matrix = self.init_params.get("E", None)
      self.beta_prime = self.init_params.get("Bp", None)
  
file_path: cornac/cornac/models/vbpr/recom_vbpr.py
imports: import numpy
  from tqdm.auto import tqdm
  from ..recommender import Recommender
  from ..recommender import ANNMixin, MEASURE_DOT
  from ...exception import CornacException
  from ...utils import fast_dot
  from ...utils import get_rng
  from ...utils.init_utils import zeros, xavier_uniform
label_desc: Use image node_id 1 to create a new VBPR object from inherited base classes: Recommender, ANNMixin with example: obj = VBPR(name, k, k2, n_epochs, batch_size, learning_rate, lambda_w, lambda_b, lambda_e, use_gpu, trainable, verbose, init_params, seed)