class_docstr: Base class for dynamic graph construction.
  
  Parameters
  ----------
  sim_metric_type : str, optional
      Specify similarity metric function type including "attention",
      "weighted_cosine", "gat_attention", "rbf_kernel", and "cosine".
      Default: ``"weighted_cosine"``.
  num_heads : int, optional
      Specify the number of heads for multi-head similarity metric
      function, default: ``1``.
  top_k_neigh : int, optional
      Specify the top k value for knn neighborhood graph sparsificaiton,
      default: ``None``.
  epsilon_neigh : float, optional
      Specify the epsilon value (i.e., between ``0`` and ``1``) for
      epsilon neighborhood graph sparsificaiton, default: ``None``.
  smoothness_ratio : float, optional
      Specify the smoothness ratio (i.e., between ``0`` and ``1``)
      for graph regularization on smoothness, default: ``None``.
  connectivity_ratio : float, optional
      Specify the connectivity ratio (i.e., between ``0`` and ``1``)
      for graph regularization on connectivity, default: ``None``.
  sparsity_ratio : float, optional
      Specify the sparsity ratio (i.e., between ``0`` and ``1``)
      for graph regularization on sparsity, default: ``None``.
  input_size : int, optional
      The dimension of input embeddings, default: ``None``.
  hidden_size : int, optional
      The dimension of hidden layers, default: ``None``.
class_docstr_tok: ["Base","class","for","dynamic","graph","construction",".","Parameters","--","--","--","--","--","sim_metric_type",":","str",",","optional","Specify","similarity","metric","function","type","including","``","attention","''",",","``","weighted_cosine","''",",","``","gat_attention","''",",","``","rbf_kernel","''",",","and","``","cosine","''",".","Default",":","``","``","weighted_cosine","''","``",".","num_heads",":","int",",","optional","Specify","the","number","of","heads","for","multi-head","similarity","metric","function",",","default",":","``","1","``",".","top_k_neigh",":","int",",","optional","Specify","the","top","k","value","for","knn","neighborhood","graph","sparsificaiton",",","default",":","``","None","``",".","epsilon_neigh",":","float",",","optional","Specify","the","epsilon","value","(","i.e.",",","between","``","0","``","and","``","1","``",")","for","epsilon","neighborhood","graph","sparsificaiton",",","default",":","``","None","``",".","smoothness_ratio",":","float",",","optional","Specify","the","smoothness","ratio","(","i.e.",",","between","``","0","``","and","``","1","``",")","for","graph","regularization","on","smoothness",",","default",":","``","None","``",".","connectivity_ratio",":","float",",","optional","Specify","the","connectivity","ratio","(","i.e.",",","between","``","0","``","and","``","1","``",")","for","graph","regularization","on","connectivity",",","default",":","``","None","``",".","sparsity_ratio",":","float",",","optional","Specify","the","sparsity","ratio","(","i.e.",",","between","``","0","``","and","``","1","``",")","for","graph","regularization","on","sparsity",",","default",":","``","None","``",".","input_size",":","int",",","optional","The","dimension","of","input","embeddings",",","default",":","``","None","``",".","hidden_size",":","int",",","optional","The","dimension","of","hidden","layers",",","default",":","``","None","``","."]
docstr: Build epsilon neighbourhood graph.
  
  Parameters
  ----------
  attention : torch.Tensor
      The attention matrix.
  epsilon_neigh : float
      The threshold value for epsilon neighbourhood graph.
  
  Returns
  -------
  torch.Tensor
      The sparsified adjacency matrix.
docstr_tok: ["Build","epsilon","neighbourhood","graph",".","Parameters","--","--","--","--","--","attention",":","torch.Tensor","The","attention","matrix",".","epsilon_neigh",":","float","The","threshold","value","for","epsilon","neighbourhood","graph",".","Returns","--","--","--","-","torch.Tensor","The","sparsified","adjacency","matrix","."]
code: def _build_epsilon_neighbourhood(self, attention, epsilon_neigh):
      """Build epsilon neighbourhood graph.
  
      Parameters
      ----------
      attention : torch.Tensor
          The attention matrix.
      epsilon_neigh : float
          The threshold value for epsilon neighbourhood graph.
  
      Returns
      -------
      torch.Tensor
          The sparsified adjacency matrix.
      """
      mask = (attention > epsilon_neigh).detach().float()
      weighted_adj = attention * mask + self.mask_off_val * (1 - mask)
  
      return weighted_adj
  
imports: import numpy
  import torch
  import torch.nn.functional
  from scipy import sparse
  from torch import nn
  from ..utils.constants import INF, VERY_SMALL_NUMBER
  from ..utils.generic_utils import normalize_adj, sparse_mx_to_torch_sparse_tensor
label_desc: Use image node_id 7 for calling the DynamicGraphConstructionBase obj's underlying member method code with example usage: obj._build_epsilon_neighbourhood(attention, epsilon_neigh) and returns: weighted_adj