Skip to content

Commit

Permalink
Add notebook on persistent homology of undirected and directed graphs…
Browse files Browse the repository at this point in the history
…, fix bugs with homology_dimensions in FlagserPersistence, fix #92, bump pyflagser version (#462)

* Add notebook on persistent homology of undirected and directed graphs

* Fix errors with use of homology_dimensions kwarg in FlagserPersistence

- Implementation was incorrect in cases where minimum in homology_dimensions is greater than 1
- Implementation would crash whenever `flagser_weighted` does not return a list of size self._max_homology_dimension + 1 - self._min_homology_dimension, as can happen with small graphs

* Fix #92

Document removal of one infinite bar in simplicial transformers

* Polish up classifying_shapes notebook

* Upload clique complex filtration images

* Add SVGs for directed flag complex illustration

* Implement some of @lewtun's suggestions for classifying shapes notebook

* Add general persistence diagram discussion to vietoris_rips_quickstart.ipynb

* Fix VR notebook and add explanation of homology_dimensions parameter

* Bump pyflagser version required by giotto-tda

* Improve docs for VietorisRipsPersistence by explaining how precomputed input is handled
  • Loading branch information
ulupo authored Sep 1, 2020
2 parents 246d60d + 49eb5dc commit 60eaa0f
Show file tree
Hide file tree
Showing 27 changed files with 1,266 additions and 211 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ The latest stable version of ``giotto-tda`` requires:
- SciPy (>= 1.5.0)
- joblib (>= 0.16.0)
- scikit-learn (>= 0.23.1)
- pyflagser (>= 0.4.0)
- pyflagser (>= 0.4.1)
- python-igraph (>= 0.8.2)
- plotly (>= 4.8.2)
- ipywidgets (>= 7.5.1)
Expand Down
45 changes: 22 additions & 23 deletions doc/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,26 @@ Installation
Dependencies
************

The latest stable version of giotto-tda requires:
The latest stable version of ``giotto-tda`` requires:

- Python (>= 3.6)
- NumPy (>= 1.19.1)
- SciPy (>= 1.5.0)
- joblib (>= 0.16.0)
- scikit-learn (>= 0.23.1)
- pyflagser (>= 0.4.0)
- pyflagser (>= 0.4.1)
- python-igraph (>= 0.8.2)
- plotly (>= 4.8.2)
- ipywidgets (>= 7.5.1)

To run the examples, jupyter is required.
To run the examples, ``jupyter`` is required.


*****************
User installation
*****************

The simplest way to install giotto-tda is using ``pip`` ::
The simplest way to install ``giotto-tda`` is using ``pip`` ::

python -m pip install -U giotto-tda

Expand All @@ -39,10 +39,10 @@ bug fixes can be installed by running ::

python -m pip install -U giotto-tda-nightly

The main difference between giotto-tda-nightly and the developer installation (see the section
The main difference between ``giotto-tda-nightly`` and the developer installation (see the section
on contributing, below) is that the former is shipped with pre-compiled wheels (similarly to the stable
release) and hence does not require any C++ dependencies. As the main library module is called ``gtda`` in
both the stable and nightly versions, giotto-tda and giotto-tda-nightly should not be installed in
both the stable and nightly versions, ``giotto-tda`` and ``giotto-tda-nightly`` should not be installed in
the same environment.

**********************
Expand All @@ -51,7 +51,7 @@ Developer installation

.. _dev_installation:

Installing both the PyPI release and source of giotto-tda in the same environment is not recommended since it is
Installing both the PyPI release and source of ``giotto-tda`` in the same environment is not recommended since it is
known to cause conflicts with the C++ bindings.

The developer installation requires three important C++ dependencies:
Expand Down Expand Up @@ -97,44 +97,43 @@ is as follows:
Boost
-----

Some users are experiencing some issue when installation `boost` on Windows. To help them resolve this issue, we customized a little bit the detection of `boost` library.
To install boost on windows, we (maintainers of giotto-tda) recommend 3 options:
Some users have been experiencing issues when installing Boost on Windows. To help them resolve them, we customized a little bit the detection of Boost.
To install Boost on Windows, we recommend 3 options:

- Pre-built binaries,
- Directly from source,
- Use an already installed boost version that fulfills `giotto-tda` requirements.
- Use an already installed Boost version that fulfills ``giotto-tda`` requirements.

Pre-built binaries
------------------

Boost propose for windows pre-built binaries to ease the installation of boost
in your system. In the
`website <https://sourceforge.net/projects/boost/files/boost-binaries/>`_, you'll have access to all versions of boost. At the time of writing
this documentation, the most recent version of boost is `1.72.0`. If you go
into the folder, you'll find different executables - choose the version
corresponding to your system (32, 64 bits). In our case, we downloaded `boost_1_72_0-msvc-14.2-64.exe`.
Follow the installation instructions, and when prompted to specify the folder to install boost, go for `C:\\local\\`.
For Windows, Boost propose pre-built binaries to ease the installation in your system. In the
`website <https://sourceforge.net/projects/boost/files/boost-binaries/>`_, you'll have access to all versions of Boost.
At the time of writing this documentation, the most recent version of Boost is `1.72.0`. If you go into the folder,
you'll find different executables - choose the version corresponding to your system (32, 64 bits). In our case, we
downloaded `boost_1_72_0-msvc-14.2-64.exe`. Follow the installation instructions, and when prompted to specify the
folder to install Boost, go for `C:\\local\\`.

Source code
-----------

Boost proposes to `download <https://www.boost.org/users/download/>`_ directly the source code of boost.
Boost proposes to `download <https://www.boost.org/users/download/>`_ directly the Boost source code.
You can choose from different sources (compressed in `.7z` or `.zip`).
Download one and uncompress it in `C:\\local\\`, so you should have something like `C:\\local\\boost_x_y_z\\<boost_files>`.

Already installed boost version
Already installed Boost version
-------------------------------

If by some obscure reason, you have boost installed in your system but the installation procedure cannot find it (can happen, no control on cmake ...).
You can help the installation script by adding the path to your installation in the following place `gtda\\cmake\\HelperBoost.cmake`.
If, for some obscure reason, you have Boost installed in your system but the installation procedure cannot find it (can happen, no control on cmake ...).
You can help the installation script by adding the path to your installation in the following place: `gtda\\cmake\\HelperBoost.cmake`.
In `HelperBoost.cmake` file, line 7, you can add your path between the quotation marks, e.g.::

list(APPEND BOOST_ROOT "C:\\<path_to_your_boost_installation>").

Troubleshooting
---------------

If you need to understand where the compiler tries to look for ``boost`` headers,
If you need to understand where the compiler tries to look for Boost headers,
you can install ``giotto-tda`` with::

python -m pip install -e . -v
Expand All @@ -144,7 +143,7 @@ Then you can look at the output for lines starting with::
Boost_INCLUDE_DIR: <path>
Boost_INCLUDE_DIRS: <path>

Also, if you have installed different versions of ``boost`` in the process of trying to instal ``giotto-tda``,
Also, if you have installed different versions of Boost in the process of trying to install ``giotto-tda``,
make sure to clear CMake cache entries::

rm -rf build/
Expand Down
Loading

0 comments on commit 60eaa0f

Please sign in to comment.