class_docstr: An implementation of `"First-order LINE" <https://arxiv.org/abs/1503.03578>`_
  from the paper "LINE: Large-scale Information Network Embedding".
  
  Args:
      dimensions (int): Dimensionality of embedding. Default is 128.
      epochs (int): Number of epochs. Default is 100.
      mini_batch_size (int): Number of samples in each mini-batch. Default is 128.
      learning_rate (float): learning rate. Default is 0.05.
      learning_rate_decay (float): learning rate decay per epoch. Default is 0.999.
      verbose (bool): whether to show a loading bar using TQDM while queering.
      seed (int): Random seed value. Default is 42.
docstr: Fitting a LINE model.
  
  Arg types:
      * **graph** *(NetworkX graph)* - The graph to be embedded.
code: def fit(self, graph: nx.classes.graph.Graph):
      """
      Fitting a LINE model.
  
      Arg types:
          * **graph** *(NetworkX graph)* - The graph to be embedded.
      """
      self._set_seed()
  
      number_of_nodes = graph.number_of_nodes()
  
      edges = np.array(graph.edges(data=False))
      number_of_edges = edges.shape[0]
  
      self.embedding = np.random.uniform(
          size=(number_of_nodes, self.dimensions)
      )
  
      for epoch in trange(
          self.epochs,
          desc="Epochs",
          disable=not self.verbose,
          leave=False,
      ):
          for _ in range(number_of_edges // self.mini_batch_size):
              gradient = np.zeros_like(self.embedding)
  
              positive_batch = edges[
                  np.random.randint(
                      number_of_edges, size=self.mini_batch_size // 2
                  )
              ]
              self._update(
                  self.embedding, positive_batch, gradient, label=1
              )
  
              negative_batch = np.random.randint(
                  number_of_nodes, size=(self.mini_batch_size // 2, 2)
              )
              self._update(
                  self.embedding, negative_batch, gradient, label=0
              )
  
              self.embedding -= (
                  self.learning_rate * self.learning_rate_decay**epoch
              ) * gradient
  
file_path: karateclub/karateclub/node_embedding/neighbourhood/first_order_line.py
imports: import numpy
  import networkx
  from karateclub.estimator import Estimator
  from tqdm.auto import trange
label_desc: Use image node_id 3 for calling the FirstOrderLINE obj's underlying member method code with example usage: obj.fit(graph) without return types