Skip to content

pyNBS.network_propagation.normalize_network

Justin Huang edited this page Jan 24, 2018 · 2 revisions

This is a helper function that performs a degree normalization on the adjacency matrix of a network. This step is not optional when performing network propagation. The normalized adjacency matrix is calculated as eqn1 where D is the diagonalized node degree of the network's binary adjacency matrix. The normalized adjacency matrix can also be thought of as the network adjacency matrix where each element is divided by the column-sum of that element. This produces a non-symmetric degree normalized adjacency matrix for the random walk. However, there is an option is available to calculate a symmetric degree-normalized adjacency matrix defined as eqn2. This function is called within network_propagation.


Function Call:

normalize_network(network, symmetric_norm=False)

Parameters:

  • network (required, Networkx.Graph): Networkx object loaded from network file.
  • symmetric_norm (optional, bool, default=False): Parameter for determining whether or not to perform a symmetric degree normalization on the adjacency matrix (see above). Typically a symmetric normalization is not performed.

Returns:

  • adj_array_norm (pandas.DataFrame): Degree-normalized adjacency matrix.
Clone this wiki locally