-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0953459
commit f2ae047
Showing
10 changed files
with
342 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line. | ||
SPHINXOPTS = | ||
SPHINXBUILD = sphinx-build | ||
SPHINXPROJ = PHATE | ||
SOURCEDIR = source | ||
BUILDDIR = build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
API Reference | ||
============= | ||
|
||
.. automodule:: graphtools | ||
:members: | ||
:undoc-members: | ||
:inherited-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
# | ||
# PHATE documentation build configuration file, created by | ||
# sphinx-quickstart on Thu Mar 30 19:50:14 2017. | ||
# | ||
# This file is execfile()d with the current directory set to its | ||
# containing dir. | ||
# | ||
# Note that not all possible configuration values are present in this | ||
# autogenerated file. | ||
# | ||
# All configuration values have a default; values that are commented out | ||
# serve to show the default. | ||
|
||
# If extensions (or modules to document with autodoc) are in another directory, | ||
# add these directories to sys.path here. If the directory is relative to the | ||
# documentation root, use os.path.abspath to make it absolute, like shown here. | ||
# | ||
import os | ||
import sys | ||
sys.path.insert(0, os.path.abspath('../..')) | ||
# print(sys.path) | ||
|
||
# -- General configuration ------------------------------------------------ | ||
|
||
# If your documentation needs a minimal Sphinx version, state it here. | ||
# | ||
# needs_sphinx = '1.0' | ||
|
||
# Add any Sphinx extension module names here, as strings. They can be | ||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom | ||
# ones. | ||
extensions = ['sphinx.ext.autodoc', | ||
'sphinx.ext.autosummary', | ||
'sphinx.ext.napoleon', | ||
'sphinx.ext.doctest', | ||
'sphinx.ext.coverage', | ||
'sphinx.ext.viewcode'] | ||
|
||
# Add any paths that contain templates here, relative to this directory. | ||
templates_path = ['ytemplates'] | ||
|
||
# The suffix(es) of source filenames. | ||
# You can specify multiple suffix as a list of string: | ||
# | ||
# source_suffix = ['.rst', '.md'] | ||
source_suffix = '.rst' | ||
|
||
# The master toctree document. | ||
master_doc = 'index' | ||
|
||
# General information about the project. | ||
project = 'graphtools' | ||
copyright = '2018 Krishnaswamy Lab, Yale University' | ||
author = 'Jay Stanley and Scott Gigante, Krishnaswamy Lab, Yale University' | ||
|
||
# The version info for the project you're documenting, acts as replacement for | ||
# |version| and |release|, also used in various other places throughout the | ||
# built documents. | ||
# | ||
# The short X.Y version. | ||
version = '0.1.3' | ||
# The full version, including alpha/beta/rc tags. | ||
release = '0.1.3' | ||
|
||
# The language for content autogenerated by Sphinx. Refer to documentation | ||
# for a list of supported languages. | ||
# | ||
# This is also used if you do content translation via gettext catalogs. | ||
# Usually you set "language" from the command line for these cases. | ||
language = None | ||
|
||
# List of patterns, relative to source directory, that match files and | ||
# directories to ignore when looking for source files. | ||
# This patterns also effect to html_static_path and html_extra_path | ||
exclude_patterns = [] | ||
|
||
# The name of the Pygments (syntax highlighting) style to use. | ||
pygments_style = 'sphinx' | ||
|
||
# If true, `todo` and `todoList` produce output, else they produce nothing. | ||
todo_include_todos = False | ||
|
||
|
||
# -- Options for HTML output ---------------------------------------------- | ||
|
||
# The theme to use for HTML and HTML Help pages. See the documentation for | ||
# a list of builtin themes. | ||
# | ||
html_theme = 'default' | ||
|
||
# Theme options are theme-specific and customize the look and feel of a theme | ||
# further. For a list of options available for each theme, see the | ||
# documentation. | ||
# | ||
# html_theme_options = {} | ||
|
||
# Add any paths that contain custom static files (such as style sheets) here, | ||
# relative to this directory. They are copied after the builtin static files, | ||
# so a file named "default.css" will overwrite the builtin "default.css". | ||
html_static_path = ['ystatic'] | ||
|
||
|
||
# -- Options for HTMLHelp output ------------------------------------------ | ||
|
||
# Output file base name for HTML help builder. | ||
htmlhelp_basename = 'graphtoolsdoc' | ||
|
||
|
||
# -- Options for LaTeX output --------------------------------------------- | ||
|
||
latex_elements = { | ||
# The paper size ('letterpaper' or 'a4paper'). | ||
# | ||
# 'papersize': 'letterpaper', | ||
|
||
# The font size ('10pt', '11pt' or '12pt'). | ||
# | ||
# 'pointsize': '10pt', | ||
|
||
# Additional stuff for the LaTeX preamble. | ||
# | ||
# 'preamble': '', | ||
|
||
# Latex figure (float) alignment | ||
# | ||
# 'figure_align': 'htbp', | ||
} | ||
|
||
# Grouping the document tree into LaTeX files. List of tuples | ||
# (source start file, target name, title, | ||
# author, documentclass [howto, manual, or own class]). | ||
latex_documents = [ | ||
(master_doc, 'graphtools.tex', 'graphtools Documentation', | ||
'Jay Stanley and Scott Gigante, Krishnaswamy Lab, Yale University', 'manual'), | ||
] | ||
|
||
|
||
# -- Options for manual page output --------------------------------------- | ||
|
||
# One entry per manual page. List of tuples | ||
# (source start file, name, description, authors, manual section). | ||
man_pages = [ | ||
(master_doc, 'graphtools', 'graphtools Documentation', | ||
[author], 1) | ||
] | ||
|
||
|
||
# -- Options for Texinfo output ------------------------------------------- | ||
|
||
# Grouping the document tree into Texinfo files. List of tuples | ||
# (source start file, target name, title, author, | ||
# dir menu entry, description, category) | ||
texinfo_documents = [ | ||
(master_doc, 'graphtools', 'graphtools Documentation', | ||
author, 'graphtools', 'One line description of project.', | ||
'Miscellaneous'), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
=========================================================================== | ||
graphtools | ||
=========================================================================== | ||
|
||
.. raw:: html | ||
|
||
<a href="https://pypi.org/project/graphtools/"><img src="https://img.shields.io/pypi/v/graphtools.svg" alt="Latest PyPi version"></a> | ||
|
||
.. raw:: html | ||
|
||
<a href="https://travis-ci.com/KrishnaswamyLab/graphtools"><img src="https://api.travis-ci.com/KrishnaswamyLab/graphtools.svg?branch=master" alt="Travis CI Build"></a> | ||
|
||
.. raw:: html | ||
|
||
<a href="https://graphtools.readthedocs.io/"><img src="https://img.shields.io/readthedocs/graphtools.svg" alt="Read the Docs"></img></a> | ||
|
||
.. raw:: html | ||
|
||
<a href="https://twitter.com/KrishnaswamyLab"><img src="https://img.shields.io/twitter/follow/KrishnaswamyLab.svg?style=social&label=Follow" alt="Twitter"></a> | ||
|
||
.. raw:: html | ||
|
||
<a href="https://github.com/KrishnaswamyLab/graphtools/"><img src="https://img.shields.io/github/stars/KrishnaswamyLab/graphtools.svg?style=social&label=Stars" alt="GitHub stars"></a> | ||
|
||
Tools for building and manipulating graphs in Python. | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
installation | ||
api | ||
|
||
Quick Start | ||
=========== | ||
|
||
To use `graphtools`, create a `graphtools.Graph` class:: | ||
|
||
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 | ||
|
||
To use `graphtools` with `pygsp`, create a `graphtools.Graph` class with `use_pygsp=True`:: | ||
|
||
from sklearn import datasets | ||
import graphtools | ||
digits = datasets.load_digits() | ||
G = graphtools.Graph(digits['data'], use_pygsp=True) | ||
N = G.N | ||
W = G.W | ||
basis = G.compute_fourier_basis() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
Installation | ||
============ | ||
|
||
Python installation | ||
------------------- | ||
|
||
Installation with `pip` | ||
~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
The Python version of PHATE can be installed using:: | ||
|
||
pip install --user phate | ||
|
||
Installation from source | ||
~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
The Python version of PHATE can be installed from GitHub by running the following from a terminal:: | ||
|
||
git clone --recursive git://github.com/KrishnaswamyLab/PHATE.git | ||
cd Python | ||
python setup.py install --user | ||
|
||
MATLAB installation | ||
------------------- | ||
|
||
1. The MATLAB version of PHATE can be accessed using:: | ||
|
||
git clone git://github.com/KrishnaswamyLab/PHATE.git | ||
cd PHATE/Matlab | ||
|
||
2. Add the PHATE/Matlab directory to your MATLAB path and run any of our `test` scripts to get a feel for PHATE. | ||
|
||
R installation | ||
-------------- | ||
|
||
In order to use PHATE in R, you must also install the Python package. | ||
|
||
Installation from CRAN and PyPi | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Install `phateR` from CRAN by running the following code in R:: | ||
|
||
install.packages("phateR") | ||
|
||
Install `phate` in Python by running the following code from a terminal:: | ||
|
||
pip install --user phate | ||
|
||
Installation with `devtools` and `reticulate` | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
The development version of PHATE can be installed directly from R with `devtools`:: | ||
|
||
if (!suppressWarnings(require(devtools))) install.packages("devtools") | ||
devtools::install_github("KrishnaswamyLab/phateR") | ||
|
||
If you have the development version of `reticulate`, you can also install `phate` in Python by running the following code in R:: | ||
|
||
devtools::install_github("rstudio/reticulate") | ||
reticulate::py_install("phate") | ||
|
||
Installation from source | ||
~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
The latest source version of PHATE can be accessed by running the following in a terminal:: | ||
|
||
git clone --recursive git://github.com/SmitaKrishnaswamy/PHATE.git | ||
cd PHATE/phateR | ||
R CMD INSTALL | ||
cd ../Python | ||
python setup.py install --user | ||
|
||
If the `phateR` folder is empty, you have may forgotten to use the `--recursive` option for `git clone`. You can rectify this by running the following in a terminal:: | ||
|
||
cd PHATE | ||
git submodule init | ||
git submodule update | ||
cd phateR | ||
R CMD INSTALL | ||
cd ../Python | ||
python setup.py install --user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
numpy>=1.10.0 | ||
scipy>=0.18.0 | ||
pygsp>=>=0.5.1 | ||
scikit-learn>=0.19.1 | ||
future |
Oops, something went wrong.