compute_multimodal_mod {CommKern}R Documentation

Compute multimodal modularity matrix

Description

Description of the compute multimodal modularity matrix function.

Usage

compute_multimodal_mod(mod_matrix, net, communities, alpha)

Arguments

mod_matrix

the modularity matrix output from the compute_modularity_matrix function

net

a network object in list form (see the matrix_to_df function for more details)

communities

the vector of node assignments to communities

alpha

a double parameter balancing the use of the guidance matrix in modularity calculation

Details

Calculates the multimodal version of the modularity matrix, which is detailed in the accompanying manuscript as the following:

\sum_{i \neq j} M_{ij} \delta(C_i,C_j) - \alpha \sum_{i \neq j} S_{ij} \delta(C_i,C_j).

This function incorporates both the modularity matrix calculated from the compute_modularity_matrix function and adds the additional component of a guidance matrix. The alpha parameter controls the extent to which the guidance matrix influences the modularity, where alpha=0 means the function reverts to the typical modularity calculation and alpha > 0 allows for some influence of the guidance matrix. The guidance matrix will not penalize the modularity if two nodes are not connected within it; it will only decrease the modularity if the two nodes have guidance information. The function takes in a network object, the mod_matrix output from compute_modularity_matrix, a vector of communities, and a parameter alpha and returns the multimodal modularity matrix.

Value

multimodal modularity matrix

See Also

matrix_to_df, compute_modularity_matrix


[Package CommKern version 1.0.1 Index]