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: Factorizing a residual matrix, returning the approximate target, and an embedding.
  
  Arg types:
      * **new_residuals** *(COO Scipy matrix)* - The residual matrix.
  
  Return types:
      * **scores** *(COO Scipy matrix)* - The residual scores.
      * **W** *(Numpy array)* - The embedding matrix.
docstr_tok: ["Factorizing","a","residual","matrix",",","returning","the","approximate","target",",","and","an","embedding",".","Arg","types",":","*","*","*","new_residuals","*","*","*","(","COO","Scipy","matrix",")","*","-","The","residual","matrix",".","Return","types",":","*","*","*","scores","*","*","*","(","COO","Scipy","matrix",")","*","-","The","residual","scores",".","*","*","*","W","*","*","*","(","Numpy","array",")","*","-","The","embedding","matrix","."]
code: def _fit_and_score_NMF(self, new_residuals):
      """
      Factorizing a residual matrix, returning the approximate target, and an embedding.
  
      Arg types:
          * **new_residuals** *(COO Scipy matrix)* - The residual matrix.
  
      Return types:
          * **scores** *(COO Scipy matrix)* - The residual scores.
          * **W** *(Numpy array)* - The embedding matrix.
      """
  
      parameter_names = signature(NMF).parameters
  
      if "alpha" in parameter_names:
          model = NMF(
              n_components=self.dimensions,
              init="random",
              alpha=self.alpha,
              verbose=False,
          )
      elif "alpha_W" in parameter_names:
          model = NMF(
              n_components=self.dimensions,
              init="random",
              alpha_W=self.alpha,
              verbose=False,
          )
      else:
          raise NotImplementedError(
              "The version of Scikit-learn installed "
              "on this device is not currently supported. "
              "More specifically, in older version of the NMF "
              "method a parameter called `alpha` was available "
              "and it has been replaced with a second parameter "
              "called `alpha_W`. In the installed version neither "
              "parameters were found, and it is therefore unclear "
              "as to how we should proceed."
          )
  
      W = model.fit_transform(new_residuals)
      H = model.components_
  
      sub_scores = np.sum(
          np.multiply(W[self._index_1, :], H[:, self._index_2].T),
          axis=1,
      )
      scores = np.maximum(self._residuals.data - sub_scores, 0)
      scores = sparse.csr_matrix(
          (scores, (self._index_1, self._index_2)),
          shape=self._shape,
          dtype=np.float32,
      )
      return scores, W
  
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 7 for calling the BoostNE obj's underlying member method code with example usage: obj._fit_and_score_NMF(new_residuals) and returns: scores,  W