class_docstr: Correlation-Sensitive Next-Basket Recommendation
  
  Parameters
  ----------
  name: string, default: 'Beacon'
      The name of the recommender model.
  
  emb_dim: int, optional, default: 2
      Embedding dimension
  
  rnn_unit: int, optional, default: 4
      Number of dimension in a rnn unit.
  
  alpha: float, optional, default: 0.5
      Hyperparameter to control the balance between correlative and sequential associations.
  
  rnn_cell_type: str, optional, default: 'LSTM'
      RNN cell type, options including ['LSTM', 'GRU', None]
      If None, BasicRNNCell will be used.
  
  dropout_rate: float, optional, default: 0.5
      Dropout rate of neural network dense layers
  
  nb_hop: int, optional, default: 1
      Number of hops for constructing correlation matrix.
      If 0, zeros matrix will be used.
  
  n_epochs: int, optional, default: 15
      Number of training epochs
  
  batch_size: int, optional, default: 32
      Batch size
  
  lr: float, optional, default: 0.001
      Initial value of learning rate for the optimizer.
  
  verbose: boolean, optional, default: False
      When True, running logs are displayed.
  
  seed: int, optional, default: None
      Random seed
  
  References
  ----------
  LE, Duc Trong, Hady Wirawan LAUW, and Yuan Fang.
  Correlation-sensitive next-basket recommendation.
  International Joint Conferences on Artificial Intelligence, 2019.
class_docstr_tok: ["Correlation-Sensitive","Next-Basket","Recommendation","Parameters","--","--","--","--","--","name",":","string",",","default",":","'Beacon'","The","name","of","the","recommender","model",".","emb_dim",":","int",",","optional",",","default",":","2","Embedding","dimension","rnn_unit",":","int",",","optional",",","default",":","4","Number","of","dimension","in","a","rnn","unit",".","alpha",":","float",",","optional",",","default",":","0.5","Hyperparameter","to","control","the","balance","between","correlative","and","sequential","associations",".","rnn_cell_type",":","str",",","optional",",","default",":","'LSTM'","RNN","cell","type",",","options","including","[","'LSTM","'",",","'GRU","'",",","None","]","If","None",",","BasicRNNCell","will","be","used",".","dropout_rate",":","float",",","optional",",","default",":","0.5","Dropout","rate","of","neural","network","dense","layers","nb_hop",":","int",",","optional",",","default",":","1","Number","of","hops","for","constructing","correlation","matrix",".","If","0",",","zeros","matrix","will","be","used",".","n_epochs",":","int",",","optional",",","default",":","15","Number","of","training","epochs","batch_size",":","int",",","optional",",","default",":","32","Batch","size","lr",":","float",",","optional",",","default",":","0.001","Initial","value","of","learning","rate","for","the","optimizer",".","verbose",":","boolean",",","optional",",","default",":","False","When","True",",","running","logs","are","displayed",".","seed",":","int",",","optional",",","default",":","None","Random","seed","References","--","--","--","--","--","LE",",","Duc","Trong",",","Hady","Wirawan","LAUW",",","and","Yuan","Fang",".","Correlation-sensitive","next-basket","recommendation",".","International","Joint","Conferences","on","Artificial","Intelligence",",","2019","."]
code: def _remove_diag(self, adj_matrix):
      new_adj_matrix = csr_matrix(adj_matrix)
      new_adj_matrix.setdiag(0.0)
      new_adj_matrix.eliminate_zeros()
      return new_adj_matrix
  
file_path: cornac/cornac/models/beacon/recom_beacon.py
imports: import os
  from collections import Counter
  import numpy
  from scipy.sparse import csc_matrix, csr_matrix, diags
  from tqdm.auto import trange
  from ..recommender import NextBasketRecommender
label_desc: Use image node_id 6 for calling the Beacon obj's underlying member method code with example usage: obj._remove_diag(adj_matrix) and returns: new_adj_matrix