class_docstr: Implementation of Dataset class
  
  This is a simple implementation of loading and processing dataset for metapath2vec model.
  
  Args:
      config: dict, some configure parameters.
class_docstr_tok: ["Implementation","of","Dataset","class","This","is","a","simple","implementation","of","loading","and","processing","dataset","for","metapath2vec","model",".","Args",":","config",":","dict",",","some","configure","parameters","."]
docstr: Get a frequency table for sub-sampling.
          
docstr_tok: ["Get","a","frequency","table","for","sub-sampling","."]
code: def initDiscards(self):
      """Get a frequency table for sub-sampling."""
      t = 0.0001
      f = np.array(list(self.word2freq.values())) / self.token_count
      self.discards = np.sqrt(t / f) + (t / f)
  
file_path: PGL/legacy/examples/metapath2vec/Dataset.py
imports: import sys
  import os
  import glob
  import numpy
  import tqdm
  import time
  import logging
  import random
  from pgl import heter_graph
  import pickle
label_desc: Use image node_id 3 for calling the Dataset obj's underlying member method code with example usage: obj.initDiscards() without return types