class_docstr: An implementation of `"GL2Vec" <https://link.springer.com/chapter/10.1007/978-3-030-36718-3_1>`_
  from the ICONIP '19 paper "GL2vec: Graph Embedding Enriched by Line Graphs with Edge Features".
  First, the algorithm creates the line graph of each graph in the graph dataset.
  The procedure creates Weisfeiler-Lehman tree features for nodes in graphs. Using
  these features a document (graph) - feature co-occurrence matrix is decomposed in order
  to generate representations for the graphs.
  
  Args:
      wl_iterations (int): Number of Weisfeiler-Lehman iterations. Default is 2.
      dimensions (int): Dimensionality of embedding. Default is 128.
      workers (int): Number of cores. Default is 4.
      down_sampling (float): Down sampling frequency. Default is 0.0001.
      epochs (int): Number of epochs. Default is 10.
      learning_rate (float): HogWild! learning rate. Default is 0.025.
      min_count (int): Minimal count of graph feature occurrences. Default is 5.
      seed (int): Random seed for the model. Default is 42.
      erase_base_features: (bool): Whether to delete the base features.
docstr: Infer the graph embeddings.
  
  Arg types:
      * **graphs** *(List of NetworkX graphs)* - The graphs to be embedded.
  
  Return types:
      * **embedding** *(Numpy array)* - The embedding of graphs.
docstr_tok: ["Infer","the","graph","embeddings",".","Arg","types",":","*","*","*","graphs","*","*","*","(","List","of","NetworkX","graphs",")","*","-","The","graphs","to","be","embedded",".","Return","types",":","*","*","*","embedding","*","*","*","(","Numpy","array",")","*","-","The","embedding","of","graphs","."]
code: def infer(self, graphs) -> np.array:
      """Infer the graph embeddings.
  
      Arg types:
          * **graphs** *(List of NetworkX graphs)* - The graphs to be embedded.
  
      Return types:
          * **embedding** *(Numpy array)* - The embedding of graphs.
      """
      self._set_seed()
      graphs = self._check_graphs(graphs)
      graphs = [self._create_line_graph(graph) for graph in graphs]
      documents = [
          WeisfeilerLehmanHashing(
              graph=graph,
              wl_iterations=self.wl_iterations,
              use_node_attribute=None,
              erase_base_features=self.erase_base_features,
          )
          for graph in graphs
      ]
  
      documents = [
          doc.get_graph_features() for _, doc in enumerate(documents)
      ]
  
      embedding = np.array(
          [
              self.model.infer_vector(
                  doc,
                  alpha=self.learning_rate,
                  min_alpha=0.00001,
                  epochs=self.epochs,
              )
              for doc in documents
          ]
      )
  
      return embedding
  
file_path: karateclub/karateclub/graph_embedding/gl2vec.py
imports: from typing import Optional
  import numpy
  import networkx
  from typing import List
  from karateclub.estimator import Estimator
  from gensim.models.doc2vec import Doc2Vec, TaggedDocument
  from karateclub.utils.treefeatures import WeisfeilerLehmanHashing
label_desc: Use image node_id 5 for calling the GL2Vec obj's underlying member method code with example usage: obj.infer(graphs) and returns: embedding