class_docstr: An implementation of `"NetLSD" <https://arxiv.org/abs/1805.10712>`_
  from the KDD '18 paper "NetLSD: Hearing the Shape of a Graph". The procedure
  calculate the heat kernel trace of the normalized Laplacian matrix over a
  vector of time scales. If the matrix is large it switches to an approximation
  of the eigenvalues.
  
  Args:
      scale_min (float): Time scale interval minimum. Default is -2.0.
      scale_max (float): Time scale interval maximum. Default is 2.0.
      scale_steps (int): Number of steps in time scale. Default is 250.
      scale_approximations (int): Number of eigenvalue approximations. Default is 200.
      seed (int): Random seed value. Default is 42.
class_docstr_tok: ["An","implementation","of","`","``","NetLSD","''","<","https",":","\/\/arxiv.org\/abs\/1805.10712",">","`","_","from","the","KDD","'18","paper","``","NetLSD",":","Hearing","the","Shape","of","a","Graph","''",".","The","procedure","calculate","the","heat","kernel","trace","of","the","normalized","Laplacian","matrix","over","a","vector","of","time","scales",".","If","the","matrix","is","large","it","switches","to","an","approximation","of","the","eigenvalues",".","Args",":","scale_min","(","float",")",":","Time","scale","interval","minimum",".","Default","is","-2.0.","scale_max","(","float",")",":","Time","scale","interval","maximum",".","Default","is","2.0.","scale_steps","(","int",")",":","Number","of","steps","in","time","scale",".","Default","is","250.","scale_approximations","(","int",")",":","Number","of","eigenvalue","approximations",".","Default","is","200.","seed","(","int",")",":","Random","seed","value",".","Default","is","42","."]
docstr: Calculating the eigenvalues of the normalized Laplacian.
  
  Arg types:
      * **laplacian_matrix** *(SciPy COO matrix)* - The graph to be decomposed.
  
  Return types:
      * **eigenvalues** *(Numpy array)* - The eigenvalues of the graph.
docstr_tok: ["Calculating","the","eigenvalues","of","the","normalized","Laplacian",".","Arg","types",":","*","*","*","laplacian_matrix","*","*","*","(","SciPy","COO","matrix",")","*","-","The","graph","to","be","decomposed",".","Return","types",":","*","*","*","eigenvalues","*","*","*","(","Numpy","array",")","*","-","The","eigenvalues","of","the","graph","."]
code: def _calculate_eigenvalues(self, laplacian_matrix):
      """
      Calculating the eigenvalues of the normalized Laplacian.
  
      Arg types:
          * **laplacian_matrix** *(SciPy COO matrix)* - The graph to be decomposed.
  
      Return types:
          * **eigenvalues** *(Numpy array)* - The eigenvalues of the graph.
      """
      number_of_nodes = laplacian_matrix.shape[0]
      if 2 * self.approximations < number_of_nodes:
          lower_eigenvalues = sps.linalg.eigsh(
              laplacian_matrix,
              self.approximations,
              which="SM",
              ncv=5 * self.approximations,
              return_eigenvectors=False,
          )[::-1]
          upper_eigenvalues = sps.linalg.eigsh(
              laplacian_matrix,
              self.approximations,
              which="LM",
              ncv=5 * self.approximations,
              return_eigenvectors=False,
          )
          eigenvalues = self._updown_linear_approx(
              lower_eigenvalues, upper_eigenvalues, number_of_nodes
          )
      else:
          eigenvalues = sps.linalg.eigsh(
              laplacian_matrix,
              number_of_nodes - 2,
              which="LM",
              return_eigenvectors=False,
          )
      return eigenvalues
  
file_path: karateclub/karateclub/graph_embedding/netlsd.py
imports: import numpy
  import networkx
  from typing import List
  import scipy.sparse
  from karateclub.estimator import Estimator
label_desc: Use image node_id 4 for calling the NetLSD obj's underlying member method code with example usage: obj._calculate_eigenvalues(laplacian_matrix) and returns: eigenvalues