networkinference.utils.tools.adjrownorm
Returns row-normalized adjacency matrix of NetworkX graph.
Parameters
- ANetworkX graph
Can be weighted or directed.
- weightstring
Label of edge weights in A, if A is a weighted graph. Default value: None.
Returns
- scipy sparse matrix
Row-normalized adjacency matrix.
Examples
>>> from networkinference.utils import FakeData, adjrownorm
>>> A = FakeData.erdos_renyi()
>>> A_norm = adjrownorm(A)