code: def initTableDiscards(self):
      # get a frequency table for sub-sampling. Note that the frequency is adjusted by
      # sub-sampling tricks.
      t = 0.0001
      f = (
          np.array(list(self.word_frequency.values()))
          / self.token_count
      )
      self.discards = np.sqrt(t / f) + (t / f)
  
file_path: dgl/examples/pytorch/metapath2vec/reading_data.py
imports: import numpy
  import torch
  from download import AminerDataset
  from torch.utils.data import Dataset
label_desc: Use image node_id 3 for calling the DataReader obj's underlying member method code with example usage: obj.initTableDiscards() without return types