class_docstr: ENMF is an efficient non-sampling model for general recommendation.
  In order to run non-sampling model, please set the neg_sampling parameter as None .
class_docstr_tok: ["ENMF","is","an","efficient","non-sampling","model","for","general","recommendation",".","In","order","to","run","non-sampling","model",",","please","set","the","neg_sampling","parameter","as","None","."]
code: def __init__(self, config, dataset):
      super(ENMF, self).__init__(config, dataset)
  
      self.embedding_size = config["embedding_size"]
      self.dropout_prob = config["dropout_prob"]
      self.reg_weight = config["reg_weight"]
      self.negative_weight = config["negative_weight"]
  
      # get all users' history interaction information.
      # matrix is padding by the maximum number of a user's interactions
      (
          self.history_item_matrix,
          _,
          self.history_lens,
      ) = dataset.history_item_matrix()
      self.history_item_matrix = self.history_item_matrix.to(
          self.device
      )
  
      self.user_embedding = nn.Embedding(
          self.n_users, self.embedding_size, padding_idx=0
      )
      self.item_embedding = nn.Embedding(
          self.n_items, self.embedding_size, padding_idx=0
      )
      self.H_i = nn.Linear(self.embedding_size, 1, bias=False)
      self.dropout = nn.Dropout(self.dropout_prob)
  
      self.apply(xavier_normal_initialization)
  
file_path: RecBole/recbole/model/general_recommender/enmf.py
imports: import torch
  import torch.nn
  from recbole.model.init import xavier_normal_initialization
  from recbole.utils import InputType
  from recbole.model.abstract_recommender import GeneralRecommender
label_desc: Use image node_id 1 to create a new ENMF object from inherited base classes: GeneralRecommender with example: obj = ENMF(config, dataset)