class_docstr: An implementation of `"SCD" <http://wwwconference.org/proceedings/www2014/proceedings/p225.pdf>`_ from the
  WWW '14 paper "High Quality, Scalable and Parallel Community Detection for
  Large Real Graphs". The procedure greedily optimizes the approximate weighted
  community clustering metric. First, clusters are built around highly clustered nodes.
  Second, we refine the initial partition by using the approximate WCC. These refinements
  happen for the whole vertex set.
  
  Args:
      iterations (int): Refinemeent iterations. Default is 25.
      eps (float): Epsilon score for zero division correction. Default is 10**-6.
      seed (int): Random seed value. Default is 42.
class_docstr_tok: ["An","implementation","of","`","``","SCD","''","<","http",":","\/\/wwwconference.org\/proceedings\/www2014\/proceedings\/p225.pdf",">","`","_","from","the","WWW","'14","paper","``","High","Quality",",","Scalable","and","Parallel","Community","Detection","for","Large","Real","Graphs","''",".","The","procedure","greedily","optimizes","the","approximate","weighted","community","clustering","metric",".","First",",","clusters","are","built","around","highly","clustered","nodes",".","Second",",","we","refine","the","initial","partition","by","using","the","approximate","WCC",".","These","refinements","happen","for","the","whole","vertex","set",".","Args",":","iterations","(","int",")",":","Refinemeent","iterations",".","Default","is","25.","eps","(","float",")",":","Epsilon","score","for","zero","division","correction",".","Default","is","10","*","*","-6.","seed","(","int",")",":","Random","seed","value",".","Default","is","42","."]
docstr: Calculating the 2nd WCC component.
docstr_tok: ["Calculating","the","2nd","WCC","component","."]
code: def _calculate_theta_2(self, r, d, b, q):
      """
      Calculating the 2nd WCC component.
      """
      theta_2_left_enum = (r - 1) * (r - 2) * (d**3)
      theta_2_left_denom = (
          theta_2_left_enum
          + q * (q - 1) * self._omega
          + q * (r - 1) * self._omega * d
          + self.eps
      )
      theta_2_right_enum = (r - 1) * d + q
      theta_2_right_denom = (r + q) * (r - 1 + q) + self.eps
      theta_2 = -(theta_2_left_enum / theta_2_left_denom) * (
          theta_2_right_enum / theta_2_right_denom
      )
      return theta_2
  
file_path: karateclub/karateclub/community_detection/non_overlapping/scd.py
imports: import networkx
  from typing import Dict
  from karateclub.estimator import Estimator
label_desc: Use image node_id 9 for calling the SCD obj's underlying member method code with example usage: obj._calculate_theta_2(r, d, b, q) and returns: theta_2