class_docstr: Collaborative Deep Learning.
  
  Parameters
  ----------
  name: string, default: 'CDL'
      The name of the recommender model.
  
  k: int, optional, default: 50
      The dimension of the latent factors.
  
  max_iter: int, optional, default: 100
      Maximum number of iterations or the number of epochs for SGD.
  
  autoencoder_structure: list, default: None
      The number of neurons of encoder/decoder layer for SDAE.
      For example, autoencoder_structure = [200], the SDAE structure will be [vocab_size, 200, k, 200, vocab_size]
  
  act_fn: str, default: 'relu'
      Name of the activation function used for the auto-encoder.
      Supported functions: ['sigmoid', 'tanh', 'elu', 'relu', 'relu6', 'leaky_relu', 'identity']
  
  learning_rate: float, optional, default: 0.001
      The learning rate for AdamOptimizer.
  
  vocab_size: int, default: 8000
      The size of text input for the SDAE.
  
  lambda_u: float, optional, default: 0.1
      The regularization parameter for users.
  
  lambda_v: float, optional, default: 10
      The regularization parameter for items.
  
  lambda_w: float, optional, default: 0.1
      The regularization parameter for SDAE weights.
  
  lambda_n: float, optional, default: 1000
      The regularization parameter for SDAE output.
  
  a: float, optional, default: 1
      The confidence of observed ratings.
  
  b: float, optional, default: 0.01
      The confidence of unseen ratings.
  
  corruption_rate: float, optional, default: 0.3
      The corruption ratio for input text of the SDAE.
  
  dropout_rate: float, optional, default: 0.1
      The probability that each element is removed in dropout of SDAE.
  
  batch_size: int, optional, default: 128
      The batch size for SGD.
  
  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).
  
  init_params: dictionary, optional, default: None
      List of initial parameters, e.g., init_params = {'U':U, 'V':V}
  
      U: ndarray, shape (n_users,k)
          The user latent factors, optional initialization via init_params.
      V: ndarray, shape (n_items,k)
          The item latent factors, optional initialization via init_params.
  
  seed: int, optional, default: None
      Random seed for weight initialization.
  
  References
  ----------
  * Hao Wang, Naiyan Wang, Dit-Yan Yeung. CDL: Collaborative Deep Learning for Recommender Systems. In : SIGKDD. 2015. p. 1235-1244.
class_docstr_tok: ["Collaborative","Deep","Learning",".","Parameters","--","--","--","--","--","name",":","string",",","default",":","'CDL'","The","name","of","the","recommender","model",".","k",":","int",",","optional",",","default",":","50","The","dimension","of","the","latent","factors",".","max_iter",":","int",",","optional",",","default",":","100","Maximum","number","of","iterations","or","the","number","of","epochs","for","SGD",".","autoencoder_structure",":","list",",","default",":","None","The","number","of","neurons","of","encoder\/decoder","layer","for","SDAE",".","For","example",",","autoencoder_structure","=","[","200","]",",","the","SDAE","structure","will","be","[","vocab_size",",","200",",","k",",","200",",","vocab_size","]","act_fn",":","str",",","default",":","'relu'","Name","of","the","activation","function","used","for","the","auto-encoder",".","Supported","functions",":","[","'sigmoid","'",",","'tanh","'",",","'elu","'",",","'relu","'",",","'relu6","'",",","'leaky_relu","'",",","'identity","'","]","learning_rate",":","float",",","optional",",","default",":","0.001","The","learning","rate","for","AdamOptimizer",".","vocab_size",":","int",",","default",":","8000","The","size","of","text","input","for","the","SDAE",".","lambda_u",":","float",",","optional",",","default",":","0.1","The","regularization","parameter","for","users",".","lambda_v",":","float",",","optional",",","default",":","10","The","regularization","parameter","for","items",".","lambda_w",":","float",",","optional",",","default",":","0.1","The","regularization","parameter","for","SDAE","weights",".","lambda_n",":","float",",","optional",",","default",":","1000","The","regularization","parameter","for","SDAE","output",".","a",":","float",",","optional",",","default",":","1","The","confidence","of","observed","ratings",".","b",":","float",",","optional",",","default",":","0.01","The","confidence","of","unseen","ratings",".","corruption_rate",":","float",",","optional",",","default",":","0.3","The","corruption","ratio","for","input","text","of","the","SDAE",".","dropout_rate",":","float",",","optional",",","default",":","0.1","The","probability","that","each","element","is","removed","in","dropout","of","SDAE",".","batch_size",":","int",",","optional",",","default",":","128","The","batch","size","for","SGD",".","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",")",".","init_params",":","dictionary",",","optional",",","default",":","None","List","of","initial","parameters",",","e.g.",",","init_params","=","{","'","U","'",":","U",",","'","V","'",":","V","}","U",":","ndarray",",","shape","(","n_users",",","k",")","The","user","latent","factors",",","optional","initialization","via","init_params",".","V",":","ndarray",",","shape","(","n_items",",","k",")","The","item","latent","factors",",","optional","initialization","via","init_params",".","seed",":","int",",","optional",",","default",":","None","Random","seed","for","weight","initialization",".","References","--","--","--","--","--","*","Hao","Wang",",","Naiyan","Wang",",","Dit-Yan","Yeung",".","CDL",":","Collaborative","Deep","Learning","for","Recommender","Systems",".","In",":","SIGKDD",".","2015.","p.","1235-1244","."]
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.
      """
      return self.U
  
file_path: cornac/cornac/models/cdl/recom_cdl.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 xavier_uniform
label_desc: Use image node_id 7 for calling the CDL obj's underlying member method code with example usage: obj.get_user_vectors() and returns: self