class_docstr: An implementation of `"FGSD" <https://papers.nips.cc/paper/6614-hunt-for-the-unique-stable-sparse-and-fast-feature-learning-on-graphs>`_
  from the NeurIPS '17 paper "Hunt For The Unique, Stable, Sparse And Fast Feature Learning On Graphs".
  The procedure calculates the Moore-Penrose spectrum of the normalized Laplacian.
  Using this spectrum the histogram of the spectral features is used as a whole graph representation.
  
  Args:
      hist_bins (int): Number of histogram bins. Default is 200.
      hist_range (int): Histogram range considered. Default is 20.
      seed (int): Random seed value. Default is 42.
docstr: Calculating the features of a graph.
  
  Arg types:
      * **graph** *(NetworkX graph)* - A graph to be embedded.
  
  Return types:
      * **hist** *(Numpy array)* - The embedding of a single graph.
docstr_tok: ["Calculating","the","features","of","a","graph",".","Arg","types",":","*","*","*","graph","*","*","*","(","NetworkX","graph",")","*","-","A","graph","to","be","embedded",".","Return","types",":","*","*","*","hist","*","*","*","(","Numpy","array",")","*","-","The","embedding","of","a","single","graph","."]
code: def _calculate_fgsd(self, graph):
      """
      Calculating the features of a graph.
  
      Arg types:
          * **graph** *(NetworkX graph)* - A graph to be embedded.
  
      Return types:
          * **hist** *(Numpy array)* - The embedding of a single graph.
      """
      L = nx.normalized_laplacian_matrix(graph).todense()
      fL = np.linalg.pinv(L)
      ones = np.ones(L.shape[0])
      S = (
          np.outer(np.diag(fL), ones)
          + np.outer(ones, np.diag(fL))
          - 2 * fL
      )
      hist, _ = np.histogram(
          S.flatten(), bins=self.hist_bins, range=self.hist_range
      )
      return hist
  
file_path: karateclub/karateclub/graph_embedding/fgsd.py
imports: import numpy
  import networkx
  from typing import List
  from karateclub.estimator import Estimator
label_desc: Use image node_id 2 for calling the FGSD obj's underlying member method code with example usage: obj._calculate_fgsd(graph) and returns: hist