Tools for building and manipulating graphs in Python.
graphtools is available on pip. Install by running the following in a terminal:
pip install --user graphtools
Alternatively, graphtools can be installed using Conda (most easily obtained via the Miniconda Python distribution):
conda install -c conda-forge graphtools
Or, to install the latest version from github:
pip install --user git+git://github.com/KrishnaswamyLab/graphtools.git
The graphtools.Graph class provides an all-in-one interface for k-nearest neighbors, mutual nearest neighbors, exact (pairwise distances) and landmark graphs.
Use it as follows:
from sklearn import datasets import graphtools digits = datasets.load_digits() G = graphtools.Graph(digits['data']) K = G.kernel P = G.diff_op G = graphtools.Graph(digits['data'], n_landmark=300) L = G.landmark_op
If you have any questions or require assistance using graphtools, please contact us at https://krishnaswamylab.org/get-help