graph_tool.spectral#
This module contains several linear operators based on network structure, which are useful for spectral analysis.
Sparse matrices#
Return the adjacency matrix of the graph. |
|
Return the Laplacian (or Bethe Hessian if \(r > 1\)) matrix of the graph. |
|
Return the incidence matrix of the graph. |
|
Return the transition matrix of the graph. |
|
Return the modularity matrix of the graph. |
|
Return the Hashimoto (or non-backtracking) matrix of a graph. |
|
Return the magnetic Laplacian matrix of the graph. |
|
Return the directed Laplacian matrix of Chung. |
Operator objects#
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
Spectral properties#
Return the algebraic connectivity of the graph, i.e. the second smallest eigenvalue of its Laplacian. |
|
Return a spectral embedding of the vertices, given by the eigenvectors of the Laplacian (Laplacian eigenmaps) or of the adjacency matrix. |
|
Partition the vertices with spectral clustering. |
|
Return the number of spanning trees of an undirected graph. |
|
Select the number of dimensions from a sequence of eigenvalues or singular values, with the profile likelihood method of Zhu and Ghodsi. |