GraphDiffusion is a python package based on the DiffusionGeometry library in Matlab (https://services.math.duke.edu/~mauro/code.html#DiffusionGeom).
-
GraphDiffusion has been implemented in Python3 and can be installed using
$> git clone [email protected]:pkathail/GraphDiffusion.git $> cd GraphDiffusion $> sudo pip3 install .
-
GraphDiffusion depends on a number of
python3
packages available on pypi and these dependencies are listed insetup.py
All the dependencies will be automatrically installed using the above commands
After installation, GraphDiffusion can be used with the following commands
$> import GraphDiffusion
$> res = GraphDiffusion.graph_diffusion.run_diffusion_map(data, knn=10, normalization='smarkov')
where data
is a N x D
matrix representing N
points in R ^ D
, knn
is the number of nearest neighbors, normalization
is the method for normalizing weights. Please refer to the docstring for more details.
res
is dictionary with the following objects:
T
:N x N
sparse matrix giving the normalized diffusion operatorW
:N x N
sparse matrix of weightsEigenVectors
: Eigen vectors of matrixT
EigenValues
: Eigen values of matrixT