class_docstr: An implementation of `"BoostNE" <https://arxiv.org/abs/1808.08627>`_
  from the ASONAM '19 paper "Multi-Level Network Embedding with Boosted Low-Rank
  Matrix Approximation". The procedure uses non-negative matrix factorization
  iteratively to decompose the residuals obtained by previous factorization models.
  The base target matrix is a pooled sum of adjacency matrix powers.
  
  Args:
      dimensions (int): Number of individual embedding dimensions. Default is 8.
      iterations (int): Number of boosting iterations. Default is 16.
      order (int): Number of adjacency matrix powers. Default is 2.
      alpha (float): NMF regularization parameter. Default is 0.01.
      seed (int): Random seed value. Default is 42.
class_docstr_tok: ["An","implementation","of","`","``","BoostNE","''","<","https",":","\/\/arxiv.org\/abs\/1808.08627",">","`","_","from","the","ASONAM","'19","paper","``","Multi-Level","Network","Embedding","with","Boosted","Low-Rank","Matrix","Approximation","''",".","The","procedure","uses","non-negative","matrix","factorization","iteratively","to","decompose","the","residuals","obtained","by","previous","factorization","models",".","The","base","target","matrix","is","a","pooled","sum","of","adjacency","matrix","powers",".","Args",":","dimensions","(","int",")",":","Number","of","individual","embedding","dimensions",".","Default","is","8.","iterations","(","int",")",":","Number","of","boosting","iterations",".","Default","is","16.","order","(","int",")",":","Number","of","adjacency","matrix","powers",".","Default","is","2.","alpha","(","float",")",":","NMF","regularization","parameter",".","Default","is","0.01.","seed","(","int",")",":","Random","seed","value",".","Default","is","42","."]
docstr: Weighted search procedure. Choosing a random index.
  
  Arg types:
      * **weights** *(Numpy array)* - The weights for choosing an index.
  
  Return types:
      * **low/mid** *(int)* - Sampled index.
docstr_tok: ["Weighted","search","procedure",".","Choosing","a","random","index",".","Arg","types",":","*","*","*","weights","*","*","*","(","Numpy","array",")","*","-","The","weights","for","choosing","an","index",".","Return","types",":","*","*","*","low\/mid","*","*","*","(","int",")","*","-","Sampled","index","."]
code: def _binary_search(self, weights):
      """
      Weighted search procedure. Choosing a random index.
  
      Arg types:
          * **weights** *(Numpy array)* - The weights for choosing an index.
  
      Return types:
          * **low/mid** *(int)* - Sampled index.
      """
      running_totals = np.cumsum(weights)
      target_distance = np.random.uniform(0, 1)
      low, high = 0, len(weights)
      while low < high:
          mid = int((low + high) / 2)
          distance = running_totals[mid]
          if distance < target_distance:
              low = mid + 1
          elif distance > target_distance:
              high = mid
          else:
              return mid
      return low
  
imports: import numpy
  import networkx
  from scipy import sparse
  from sklearn.decomposition import NMF
  from karateclub.estimator import Estimator
  from inspect import signature
label_desc: Use image node_id 9 for calling the BoostNE obj's underlying member method code with example usage: obj._binary_search(weights) and returns: low, mid