class_docstr: An implementation of `"M-NMF" <https://aaai.org/ocs/index.php/AAAI/AAAI17/paper/view/14589/13763>`_
  from the AAAI '17 paper "Community Preserving Network Embedding".
  The procedure uses joint non-negative matrix factorization with modularity
  based regularization in order to learn a cluster membership distribution
  over nodes. The method can be used in an overlapping and non-overlapping way.
  
  Args:
      dimensions (int): Number of dimensions. Default is 128.
      clusters (int): Number of clusters. Default is 10.
      lambd (float): KKT penalty. Default is 0.2
      alpha (float): Clustering penalty. Default is 0.05.
      beta (float): Modularity regularization penalty. Default is 0.05.
      iterations (int): Number of power iterations. Default is 200.
      lower_control (float): Floating point overflow control. Default is 10**-15.
      eta (float): Similarity mixing parameter. Default is 5.0.
      seed (int): Random seed value. Default is 42.
class_docstr_tok: ["An","implementation","of","`","``","M-NMF","''","<","https",":","\/\/aaai.org\/ocs\/index.php\/AAAI\/AAAI17\/paper\/view\/14589\/13763",">","`","_","from","the","AAAI","'17","paper","``","Community","Preserving","Network","Embedding","''",".","The","procedure","uses","joint","non-negative","matrix","factorization","with","modularity","based","regularization","in","order","to","learn","a","cluster","membership","distribution","over","nodes",".","The","method","can","be","used","in","an","overlapping","and","non-overlapping","way",".","Args",":","dimensions","(","int",")",":","Number","of","dimensions",".","Default","is","128.","clusters","(","int",")",":","Number","of","clusters",".","Default","is","10.","lambd","(","float",")",":","KKT","penalty",".","Default","is","0.2","alpha","(","float",")",":","Clustering","penalty",".","Default","is","0.05.","beta","(","float",")",":","Modularity","regularization","penalty",".","Default","is","0.05.","iterations","(","int",")",":","Number","of","power","iterations",".","Default","is","200.","lower_control","(","float",")",":","Floating","point","overflow","control",".","Default","is","10","*","*","-15.","eta","(","float",")",":","Similarity","mixing","parameter",".","Default","is","5.0.","seed","(","int",")",":","Random","seed","value",".","Default","is","42","."]
docstr: Update matrix H.
docstr_tok: ["Update","matrix","H","."]
code: def _update_H(self):
      """Update matrix H."""
      B1H = self._B1.dot(self._H)
      B2H = self._B2.dot(self._H)
      HHH = np.dot(self._H, (np.dot(np.transpose(self._H), self._H)))
      UC = np.dot(self._U, np.transpose(self._C))
      rooted = np.square(2 * self.beta * B2H) + np.multiply(
          16 * self.lambd * HHH,
          (
              2 * self.beta * B1H
              + 2 * self.alpha * UC
              + (4 * self.lambd - 2 * self.alpha) * self._H
          ),
      )
      rooted[rooted < 0] = 0
      sqroot_1 = np.sqrt(rooted)
      enum = -2 * self.beta * B2H + sqroot_1
      denom = 8 * self.lambd * HHH
      denom[denom < self.lower_control] = self.lower_control
      rooted = enum / denom
      rooted[rooted < 0] = 0
      sqroot_2 = np.sqrt(rooted)
      self._H = np.multiply(self._H, sqroot_2)
      row_sums = self._H.sum(axis=1)
      self._H = self._H / row_sums[:, np.newaxis]
  
file_path: karateclub/karateclub/community_detection/overlapping/mnmf.py
imports: import numpy
  import networkx
  from typing import Dict
  from scipy.sparse import coo_matrix
  from karateclub.estimator import Estimator
label_desc: Use image node_id 7 for calling the MNMF obj's underlying member method code with example usage: obj._update_H() without return types