class_docstr: Fraud Amazon Dataset
  
  The Amazon dataset includes product reviews under the Musical Instruments category.
  Users with more than 80% helpful votes are labelled as benign entities and users with
  less than 20% helpful votes are labelled as fraudulent entities. A fraudulent user
  detection task can be conducted on the Amazon dataset, which is a binary classification
  task. 25 handcrafted features from <https://arxiv.org/pdf/2005.10150.pdf> are taken as
  the raw node features .
  
  Users are nodes in the graph, and three relations are:
  1. U-P-U : it connects users reviewing at least one same product
  2. U-S-U : it connects users having at least one same star rating within one week
  3. U-V-U : it connects users with top 5% mutual review text similarities (measured by
  TF-IDF) among all users.
  
  Statistics:
  
  - Nodes: 11,944
  - Edges:
  
      - U-P-U: 351,216
      - U-S-U: 7,132,958
      - U-V-U: 2,073,474
  
  - Classes:
  
      - Positive (fraudulent): 821
      - Negative (benign): 7,818
      - Unlabeled: 3,305
  
  - Positive-Negative ratio: 1 : 10.5
  - Node feature size: 25
  
  Parameters
  ----------
  raw_dir : str
      Specifying the directory that will store the
      downloaded data or the directory that
      already stores the input data.
      Default: ~/.dgl/
  random_seed : int
      Specifying the random seed in splitting the dataset.
      Default: 717
  train_size : float
      training set size of the dataset.
      Default: 0.7
  val_size : float
      validation set size of the dataset, and the
      size of testing set is (1 - train_size - val_size)
      Default: 0.1
  force_reload : bool
      Whether to reload the dataset. Default: False
  verbose : bool
      Whether to print out progress information. Default: True.
  transform : callable, optional
      A transform that takes in a :class:`~dgl.DGLGraph` object and returns
      a transformed version. The :class:`~dgl.DGLGraph` object will be
      transformed before every access.
  
  Examples
  --------
  >>> dataset = FraudAmazonDataset()
  >>> graph = dataset[0]
  >>> num_classes = dataset.num_classes
  >>> feat = graph.ndata['feature']
  >>> label = graph.ndata['label']
class_docstr_tok: ["Fraud","Amazon","Dataset","The","Amazon","dataset","includes","product","reviews","under","the","Musical","Instruments","category",".","Users","with","more","than","80","%","helpful","votes","are","labelled","as","benign","entities","and","users","with","less","than","20","%","helpful","votes","are","labelled","as","fraudulent","entities",".","A","fraudulent","user","detection","task","can","be","conducted","on","the","Amazon","dataset",",","which","is","a","binary","classification","task",".","25","handcrafted","features","from","<","https",":","\/\/arxiv.org\/pdf\/2005.10150.pdf",">","are","taken","as","the","raw","node","features",".","Users","are","nodes","in","the","graph",",","and","three","relations","are",":","1",".","U-P-U",":","it","connects","users","reviewing","at","least","one","same","product","2",".","U-S-U",":","it","connects","users","having","at","least","one","same","star","rating","within","one","week","3",".","U-V-U",":","it","connects","users","with","top","5","%","mutual","review","text","similarities","(","measured","by","TF-IDF",")","among","all","users",".","Statistics",":","-","Nodes",":","11,944","-","Edges",":","-","U-P-U",":","351,216","-","U-S-U",":","7,132,958","-","U-V-U",":","2,073,474","-","Classes",":","-","Positive","(","fraudulent",")",":","821","-","Negative","(","benign",")",":","7,818","-","Unlabeled",":","3,305","-","Positive-Negative","ratio",":","1",":","10.5","-","Node","feature","size",":","25","Parameters","--","--","--","--","--","raw_dir",":","str","Specifying","the","directory","that","will","store","the","downloaded","data","or","the","directory","that","already","stores","the","input","data",".","Default",":","~\/.dgl\/","random_seed",":","int","Specifying","the","random","seed","in","splitting","the","dataset",".","Default",":","717","train_size",":","float","training","set","size","of","the","dataset",".","Default",":","0.7","val_size",":","float","validation","set","size","of","the","dataset",",","and","the","size","of","testing","set","is","(","1","-","train_size","-","val_size",")","Default",":","0.1","force_reload",":","bool","Whether","to","reload","the","dataset",".","Default",":","False","verbose",":","bool","Whether","to","print","out","progress","information",".","Default",":","True",".","transform",":","callable",",","optional","A","transform","that","takes","in","a",":","class",":","`","~dgl.DGLGraph","`","object","and","returns","a","transformed","version",".","The",":","class",":","`","~dgl.DGLGraph","`","object","will","be","transformed","before","every","access",".","Examples","--","--","--","--",">",">",">","dataset","=","FraudAmazonDataset","(",")",">",">",">","graph","=","dataset","[","0","]",">",">",">","num_classes","=","dataset.num_classes",">",">",">","feat","=","graph.ndata","[","'feature","'","]",">",">",">","label","=","graph.ndata","[","'label","'","]"]
code: def __init__(
      self,
      raw_dir=None,
      random_seed=717,
      train_size=0.7,
      val_size=0.1,
      force_reload=False,
      verbose=True,
      transform=None,
  ):
      super(FraudAmazonDataset, self).__init__(
          name="amazon",
          raw_dir=raw_dir,
          random_seed=random_seed,
          train_size=train_size,
          val_size=val_size,
          force_reload=force_reload,
          verbose=verbose,
          transform=transform,
      )
  
imports: import os
  import numpy
  from scipy import io
  from ..None import backend
  from ..convert import heterograph
  from .dgl_dataset import DGLBuiltinDataset
  from .utils import _get_dgl_url, load_graphs, save_graphs
label_desc: Use image node_id 1 to create a new FraudAmazonDataset object from inherited base classes: FraudDataset with example: obj = FraudAmazonDataset(raw_dir, random_seed, train_size, val_size, force_reload, verbose, transform)