fastgreedy.community         package:igraph         R Documentation

_C_o_m_m_u_n_i_t_y _s_t_r_u_c_t_u_r_e _v_i_a _g_r_e_e_d_y _o_p_t_i_m_i_z_a_t_i_o_n _o_f _m_o_d_u_l_a_r_i_t_y

_D_e_s_c_r_i_p_t_i_o_n:

     This function tries to find dense subgraph, also called
     communities in graphs via directly optimizing a modularity score.

_U_s_a_g_e:

     fastgreedy.community(graph, merges=TRUE, modularity=TRUE,
           weights=E(graph)$weight)

_A_r_g_u_m_e_n_t_s:

   graph: The input graph

  merges: Logical scalar, whether to return the merge matrix.

modularity: Logcal scalar, whether to return a vector containing the
          modularity after each merge.

 weights: If not 'NULL', then a numeric vector of edge weights. The
          length must match the number of edges in the graph. By
          default the ''weight'' edge attribute is used as weights. If
          it is not present, then all edges are considered to have the
          same weight. 

_D_e_t_a_i_l_s:

     This function implements the fast greedy modularity optimization
     algorithm for finding community structure, see  A Clauset, MEJ
     Newman, C Moore: Finding community structure in very large
     networks, http://www.arxiv.org/abs/cond-mat/0408187 for the
     details.

_V_a_l_u_e:

     A named list with the following members: 

  merges: A matrix with two column, this represents a dendogram and
          contains all the merges the algorithm performed. Each line is
          one merge and it is given by the ids of the two communities
          merged. The community ids are integer numbers starting from
          zero and the communities between zero and the number of
          vertices ('N') minus one belong to individual vertices. The
          first line of the matrix gives the first merge, this merge
          creates community 'N', the number of vertices, the second
          merge creates community 'N+1', etc. 

modularity: A numeric vector containing the modularity value  of the
          community structure after performing every merge. 

_A_u_t_h_o_r(_s):

     Tamas Nepusz ntamas@rmki.kfki.hu and Gabor Csardi
     csardi@rmki.kfki.hu for the R interface.

_R_e_f_e_r_e_n_c_e_s:

     A Clauset, MEJ Newman, C Moore: Finding community structure in
     very large networks, http://www.arxiv.org/abs/cond-mat/0408187

_S_e_e _A_l_s_o:

     'walktrap.community', 'spinglass.community',
     'leading.eigenvector.community', 'edge.betweenness.community'

_E_x_a_m_p_l_e_s:

     g <- graph.full(5) %du% graph.full(5) %du% graph.full(5)
     g <- add.edges(g, c(0,5, 0,10, 5, 10))
     fastgreedy.community(g)
     # The highest value of modularity is before performing the last two
     # merges. So this network naturally has three communities.

