docstr: :param graph:
  :param embedding_size:
  :param negative_ratio:
  :param order: 'first','second','all'
docstr_tok: [":","param","graph",":",":","param","embedding_size",":",":","param","negative_ratio",":",":","param","order",":","'first","'",",","'second","'",",","'all","'"]
code: def __init__(
      self,
      graph,
      embedding_size=8,
      negative_ratio=5,
      order="second",
  ):
      """
  
      :param graph:
      :param embedding_size:
      :param negative_ratio:
      :param order: 'first','second','all'
      """
      if order not in ["first", "second", "all"]:
          raise ValueError("mode must be fisrt,second,or all")
  
      self.graph = graph
      self.idx2node, self.node2idx = preprocess_nxgraph(graph)
      self.use_alias = True
  
      self.rep_size = embedding_size
      self.order = order
  
      self._embeddings = {}
      self.negative_ratio = negative_ratio
      self.order = order
  
      self.node_size = graph.number_of_nodes()
      self.edge_size = graph.number_of_edges()
      self.samples_per_epoch = self.edge_size * (1 + negative_ratio)
  
      self._gen_sampling_table()
      self.reset_model()
  
file_path: GraphEmbedding/ge/models/line.py
imports: import math
  import random
  import numpy
  from deepctr.layers.utils import reduce_sum
  from tensorflow.python.keras import backend
  from tensorflow.python.keras.layers import Embedding, Input, Lambda
  from tensorflow.python.keras.models import Model
  from ..alias import create_alias_table, alias_sample
  from ..utils import preprocess_nxgraph
label_desc: Use image node_id 1 to create a new LINE object  with example: obj = LINE(graph, embedding_size, negative_ratio, order)