class_docstr: Hidden Factors and Hidden Topics
  
  Parameters
  ----------
  name: string, default: 'HFT'
      The name of the recommender model.
  
  k: int, optional, default: 10
      The dimension of the latent factors.
  
  max_iter: int, optional, default: 50
      Maximum number of iterations for EM.
  
  grad_iter: int, optional, default: 50
      Maximum number of iterations for L-BFGS.
  
  lambda_text: float, default: 0.1
      Weight of corpus likelihood in objective function.
  
  l2_reg: float, default: 0.001
      Regularization for user item latent factors.
  
  vocab_size: int, optional, default: 8000
      Size of vocabulary for review text.
  
  init_params: dictionary, optional, default: None
      List of initial parameters, e.g., init_params = {'alpha': alpha, 'beta_u': beta_u,
      'beta_i': beta_i, 'gamma_u': gamma_u, 'gamma_v': gamma_v}
  
      alpha: float
          Model offset, optional initialization via init_params.
  
      beta_u: ndarray. shape (n_user, 1)
          User biases, optional initialization via init_params.
  
      beta_u: ndarray. shape (n_item, 1)
          Item biases, optional initialization via init_params.
  
      gamma_u: ndarray, shape (n_users,k)
          The user latent factors, optional initialization via init_params.
  
      gamma_v: ndarray, shape (n_items,k)
          The item latent factors, optional initialization via init_params.
  
  trainable: boolean, optional, default: True
      When False, the model will not be re-trained, and input of pre-trained parameters are required.
  
  verbose: boolean, optional, default: True
      When True, some running logs are displayed.
  
  seed: int, optional, default: None
      Random seed for weight initialization.
  
  References
  ----------
  Julian McAuley, Jure Leskovec. "Hidden Factors and Hidden Topics: Understanding Rating Dimensions with Review Text"
  RecSys '13 Proceedings of the 7th ACM conference on Recommender systems Pages 165-172
class_docstr_tok: ["Hidden","Factors","and","Hidden","Topics","Parameters","--","--","--","--","--","name",":","string",",","default",":","'HFT'","The","name","of","the","recommender","model",".","k",":","int",",","optional",",","default",":","10","The","dimension","of","the","latent","factors",".","max_iter",":","int",",","optional",",","default",":","50","Maximum","number","of","iterations","for","EM",".","grad_iter",":","int",",","optional",",","default",":","50","Maximum","number","of","iterations","for","L-BFGS",".","lambda_text",":","float",",","default",":","0.1","Weight","of","corpus","likelihood","in","objective","function",".","l2_reg",":","float",",","default",":","0.001","Regularization","for","user","item","latent","factors",".","vocab_size",":","int",",","optional",",","default",":","8000","Size","of","vocabulary","for","review","text",".","init_params",":","dictionary",",","optional",",","default",":","None","List","of","initial","parameters",",","e.g.",",","init_params","=","{","'alpha","'",":","alpha",",","'beta_u","'",":","beta_u",",","'beta_i","'",":","beta_i",",","'gamma_u","'",":","gamma_u",",","'gamma_v","'",":","gamma_v","}","alpha",":","float","Model","offset",",","optional","initialization","via","init_params",".","beta_u",":","ndarray",".","shape","(","n_user",",","1",")","User","biases",",","optional","initialization","via","init_params",".","beta_u",":","ndarray",".","shape","(","n_item",",","1",")","Item","biases",",","optional","initialization","via","init_params",".","gamma_u",":","ndarray",",","shape","(","n_users",",","k",")","The","user","latent","factors",",","optional","initialization","via","init_params",".","gamma_v",":","ndarray",",","shape","(","n_items",",","k",")","The","item","latent","factors",",","optional","initialization","via","init_params",".","trainable",":","boolean",",","optional",",","default",":","True","When","False",",","the","model","will","not","be","re-trained",",","and","input","of","pre-trained","parameters","are","required",".","verbose",":","boolean",",","optional",",","default",":","True","When","True",",","some","running","logs","are","displayed",".","seed",":","int",",","optional",",","default",":","None","Random","seed","for","weight","initialization",".","References","--","--","--","--","--","Julian","McAuley",",","Jure","Leskovec",".","``","Hidden","Factors","and","Hidden","Topics",":","Understanding","Rating","Dimensions","with","Review","Text","''","RecSys","'13","Proceedings","of","the","7th","ACM","conference","on","Recommender","systems","Pages","165-172"]
docstr: Getting a matrix of user vectors serving as query for ANN search.
  
  Returns
  -------
  out: numpy.array
      Matrix of user vectors for all users available in the model.
docstr_tok: ["Getting","a","matrix","of","user","vectors","serving","as","query","for","ANN","search",".","Returns","--","--","--","-","out",":","numpy.array","Matrix","of","user","vectors","for","all","users","available","in","the","model","."]
code: def get_user_vectors(self):
      """Getting a matrix of user vectors serving as query for ANN search.
  
      Returns
      -------
      out: numpy.array
          Matrix of user vectors for all users available in the model.
      """
      user_vectors = np.concatenate(
          (self.gamma_u, np.ones([self.gamma_u.shape[0], 1])), axis=1
      )
      return user_vectors
  
file_path: cornac/cornac/models/hft/recom_hft.py
imports: import numpy
  from tqdm.auto import trange
  from ..recommender import Recommender
  from ..recommender import ANNMixin, MEASURE_DOT
  from ...exception import ScoreException
  from ...utils import get_rng
  from ...utils.init_utils import normal
label_desc: Use image node_id 8 for calling the HFT obj's underlying member method code with example usage: obj.get_user_vectors() and returns: user_vectors