normalized_laplacian_matrix#
- normalized_laplacian_matrix(G, nodelist=None, weight='weight')[source]#
Returns the normalized Laplacian matrix of G.
The normalized graph Laplacian is the matrix
\[N = D^{-1/2} L D^{-1/2}\]where
L
is the graph Laplacian andD
is the diagonal matrix of node degrees [1].- Parameters:
- Ggraph
A NetworkX graph
- nodelistlist, optional
The rows and columns are ordered according to the nodes in nodelist. If nodelist is None, then the ordering is produced by G.nodes().
- weightstring or None, optional (default=’weight’)
The edge data key used to compute each value in the matrix. If None, then each edge has weight 1.
- Returns:
- NScipy sparse matrix
The normalized Laplacian matrix of G.
See also
laplacian_matrix
normalized_laplacian_spectrum
Notes
For MultiGraph, the edges weights are summed. See
to_numpy_array()
for other options.If the Graph contains selfloops, D is defined as
diag(sum(A, 1))
, where A is the adjacency matrix [2].References