class_docstr: SimpleX is a simple, unified collaborative filtering model.
  
  SimpleX presents a simple and easy-to-understand model. Its advantage lies
  in its loss function, which uses a larger number of negative samples and
  sets a threshold to filter out less informative samples, it also uses
  relative weights to control the balance of positive-sample loss
  and negative-sample loss.
  
  We implement the model following the original author with a pairwise training mode.
docstr: Get the combined vector of user and historically interacted items
  
  Args:
      user_e (torch.Tensor): User's feature vector, shape: [user_num, embedding_size]
      history_item_e (torch.Tensor): History item's feature vector,
          shape: [user_num, max_history_len, embedding_size]
      history_len (torch.Tensor): User's history length, shape: [user_num]
  
  Returns:
      torch.Tensor: Combined vector of user and item sequences, shape: [user_num, embedding_size]
docstr_tok: ["Get","the","combined","vector","of","user","and","historically","interacted","items","Args",":","user_e","(","torch.Tensor",")",":","User","'s","feature","vector",",","shape",":","[","user_num",",","embedding_size","]","history_item_e","(","torch.Tensor",")",":","History","item","'s","feature","vector",",","shape",":","[","user_num",",","max_history_len",",","embedding_size","]","history_len","(","torch.Tensor",")",":","User","'s","history","length",",","shape",":","[","user_num","]","Returns",":","torch.Tensor",":","Combined","vector","of","user","and","item","sequences",",","shape",":","[","user_num",",","embedding_size","]"]
code: def get_UI_aggregation(self, user_e, history_item_e, history_len):
      r"""Get the combined vector of user and historically interacted items
  
      Args:
          user_e (torch.Tensor): User's feature vector, shape: [user_num, embedding_size]
          history_item_e (torch.Tensor): History item's feature vector,
              shape: [user_num, max_history_len, embedding_size]
          history_len (torch.Tensor): User's history length, shape: [user_num]
  
      Returns:
          torch.Tensor: Combined vector of user and item sequences, shape: [user_num, embedding_size]
      """
      if self.aggregator == "mean":
          pos_item_sum = history_item_e.sum(dim=1)
          # [user_num, embedding_size]
          out = pos_item_sum / (history_len + 1.0e-10).unsqueeze(1)
      elif self.aggregator in ["user_attention", "self_attention"]:
          # [user_num, max_history_len, embedding_size]
          key = self.W_k(history_item_e)
          if self.aggregator == "user_attention":
              # [user_num, max_history_len]
              attention = torch.matmul(
                  key, user_e.unsqueeze(2)
              ).squeeze(2)
          elif self.aggregator == "self_attention":
              # [user_num, max_history_len]
              attention = self.W_q(key).squeeze(2)
          e_attention = torch.exp(attention)
          mask = (history_item_e.sum(dim=-1) != 0).int()
          e_attention = e_attention * mask
          # [user_num, max_history_len]
          attention_weight = e_attention / (
              e_attention.sum(dim=1, keepdim=True) + 1.0e-10
          )
          # [user_num, embedding_size]
          out = torch.matmul(
              attention_weight.unsqueeze(1), history_item_e
          ).squeeze(1)
      # Combined vector of user and item sequences
      out = self.UI_map(out)
      g = self.gamma
      UI_aggregation_e = g * user_e + (1 - g) * out
      return UI_aggregation_e
  
file_path: RecBole/recbole/model/general_recommender/simplex.py
imports: import torch
  from torch import nn
  import torch.nn.functional
  from recbole.model.init import xavier_normal_initialization
  from recbole.model.abstract_recommender import GeneralRecommender
  from recbole.model.loss import EmbLoss
  from recbole.utils import InputType
label_desc: Use image node_id 2 for calling the SimpleX obj's underlying member method code with example usage: obj.get_UI_aggregation(user_e, history_item_e, history_len) and returns: UI_aggregation_e