Skip to content

Commit

Permalink
Create giotto-tda v0.2.2 (#414)
Browse files Browse the repository at this point in the history
* Fix issue with docstring example and document reshaping of 1D outputs (#396)

* Toc (#394)

* Update P landscapes

Signed-off-by: ammedmar <[email protected]>

* Add distances, inner products and kernels glossary entry

Signed-off-by: ammedmar <[email protected]>

* Remake vectorization changes

Signed-off-by: ammedmar <[email protected]>

* Change [] for \lbrack \rbrack

Signed-off-by: ammedmar <[email protected]>

* Update after W's comments

Signed-off-by: ammedmar <[email protected]>

* Update after W's comments

Signed-off-by: ammedmar <[email protected]>

* Update afte W's second comments

Signed-off-by: ammedmar <[email protected]>

* Update after Umbe's comments

Signed-off-by: ammedmar <[email protected]>

* Update after Umbe's second comments

Signed-off-by: ammedmar <[email protected]>

* Update after Umbe's third comments

Signed-off-by: ammedmar <[email protected]>

* Update after Umbe's 4th comments

Signed-off-by: ammedmar <[email protected]>

* Remove concept k-skeleton

Signed-off-by: ammedmar <[email protected]>

* Add table of content

Signed-off-by: ammedmar <[email protected]>

* Add Lp & lp. Update landscape

Signed-off-by: ammedmar <[email protected]>

* Update TOC indentation

Signed-off-by: ammedmar <[email protected]>

* Add heat vectorizations entry

Signed-off-by: ammedmar <[email protected]>

* Update indentation of TOC

Signed-off-by: ammedmar <[email protected]>

* Fix extra spacing in bibliography

Signed-off-by: ammedmar <[email protected]>

* Update bibliography hack for caps

Signed-off-by: ammedmar <[email protected]>

* After Umbe's Comments

Signed-off-by: ammedmar <[email protected]>

* Update after issue #398

Signed-off-by: ammedmar <[email protected]>

* Update after Umbe's comments

Signed-off-by: ammedmar <[email protected]>

* Update after Umbe's 2nd comments

Signed-off-by: ammedmar <[email protected]>

Co-authored-by: ammedmar <[email protected]>

* Speedup windows pipeline (#402)

* Improve boost location for azure pipeline on windows

The boost version installed in the pipeline is now used

Signed-off-by: julian <[email protected]>
Co-authored-by: Umberto Lupo <[email protected]>

* Make bindings public (#395)

* Make bindings public

Signed-off-by: Guillaume Tauzin <[email protected]>

* Fix pipeline on Mac (#407)

* Refresh ccache

* Enforce CXX standard to 14 on each module

* Change variable name to comply with E741

Signed-off-by: julian <[email protected]>
Co-authored-by: Umberto Lupo <[email protected]>

* Mapper visualisation refactor: fix bugs, add summary statistics in hovertext, improve opacity, remove matplotlib dependency, add node_scale kwarg, add clone_pipeline kwarg to interactive plots,restructure/rename plotly_kwargs, improve code (#406)

* Refactor of `mapper/visualisation.py` and `mapper/utils/visualisation.py`
- Removal of color scaling
- More modularity
- Variable and function name changes
- Remove matplotlib functions used for hoverlabel background color
- Remove cmin and cmax
- Change return signature of some functions

* Add test-output.xml to .gitignore

* Replace "text" key in plot_options["node_trace"] with "hovertext"

* Improve width and opacity of nodes and edges

* Display summary statistics in hovertext with significant figure rounding via new n_sig_figs kwarg

* Rename plotly_kwargs to plotly_params

* Remove matplotlib installation requirement

* Fix mapper notebook

* Add small comment on use of matplotlib in voids_on_the_plane

* Place matplotlib in examples requirement in setup.py

* Improve docstring of make_mapper_pipeline

* Improve examples for make_mapper_pipeline and create one for plot_static_mapper_graph

* Hide set_node_sizeref, add node_scale kwarg, add clone_pipeline kwarg to plot_interactive_mapper_graph

- Update docstrings
- Update quickstart notebook

* Add helper function for colorscale-based interpolations, improve use of plotly_params

Static and interactive plots display the expect hoverlabel colors in 3D, or white if things go wrong. Thanks to @lewtun for pointing out that this was needed.

* Improve docstrings

* Hide visualization module in mapper/utils

* Add pip install matplotlib to notebook tests in manylinux job (#410)

* Fix mapper docstring issues following #406 (#411)

* Fix issues with mapper docs following #406

* Create giotto-tda version 0.2.2 (#413)

* Turn CODE_OWNERS and CODE_AUTHORS into an rst file

* Bump version number to 0.2.2

* Add release notes for v0.2.2

Co-authored-by: Anibal M. Medina-Mardones <[email protected]>
Co-authored-by: ammedmar <[email protected]>
Co-authored-by: REDS institute <[email protected]>
Co-authored-by: Guillaume Tauzin <[email protected]>
  • Loading branch information
5 people authored Jun 2, 2020
1 parent e938598 commit a0f709b
Show file tree
Hide file tree
Showing 27 changed files with 1,208 additions and 796 deletions.
23 changes: 0 additions & 23 deletions .azure-ci/install_boost.py

This file was deleted.

7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ gtda/externals/pybind11
.pytest_cache/
.hypothesis/

# Pytest output files
test-output.xml

# Latex
*.aux
*.bbl
Expand All @@ -50,7 +53,5 @@ gtda/externals/pybind11
*.log
*.pdf
*.synctex.gz
*.toc
doc/theory/glossary_backup

# development
tda/mapper/scratch/
20 changes: 18 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ set(HERA_DIR "gtda/externals/hera")
#######################################################################

pybind11_add_module(gtda_ripser "${BINDINGS_DIR}/ripser_bindings.cpp")
set_property(TARGET gtda_ripser PROPERTY CXX_STANDARD 14)

if(OpenMP_FOUND)
target_link_libraries(gtda_ripser PRIVATE OpenMP::OpenMP_CXX)
endif()
target_compile_definitions(gtda_ripser PRIVATE ASSEMBLE_REDUCTION_MATRIX=1)

target_compile_definitions(gtda_ripser PRIVATE ASSEMBLE_REDUCTION_MATRIX=1)
target_include_directories(gtda_ripser PRIVATE "${RIPSER_SRC_DIR}/ripser")

if(MSVC)
Expand All @@ -38,11 +40,13 @@ endif()
#######################################################################

pybind11_add_module(gtda_ripser_coeff "${BINDINGS_DIR}/ripser_bindings.cpp")
set_property(TARGET gtda_ripser_coeff PROPERTY CXX_STANDARD 14)

if(OpenMP_FOUND)
target_link_libraries(gtda_ripser_coeff PRIVATE OpenMP::OpenMP_CXX)
endif()
target_compile_definitions(gtda_ripser_coeff PRIVATE USE_COEFFICIENTS=1 ASSEMBLE_REDUCTION_MATRIX=1)

target_compile_definitions(gtda_ripser_coeff PRIVATE USE_COEFFICIENTS=1 ASSEMBLE_REDUCTION_MATRIX=1)
target_include_directories(gtda_ripser_coeff PRIVATE "${RIPSER_SRC_DIR}/ripser")

if(MSVC)
Expand All @@ -58,6 +62,8 @@ endif()
#######################################################################

pybind11_add_module(gtda_wasserstein ${BINDINGS_DIR}/wasserstein_bindings.cpp)
set_property(TARGET gtda_wasserstein PROPERTY CXX_STANDARD 14)

target_link_libraries(gtda_wasserstein LINK_PUBLIC ${Boost_LIBRARIES})
target_compile_definitions(gtda_wasserstein PRIVATE BOOST_RESULT_OF_USE_DECLTYPE=1 BOOST_ALL_NO_LIB=1 BOOST_SYSTEM_NO_DEPRECATED=1)

Expand All @@ -77,6 +83,8 @@ endif()
#######################################################################

pybind11_add_module(gtda_bottleneck "${BINDINGS_DIR}/bottleneck_bindings.cpp")
set_property(TARGET gtda_bottleneck PROPERTY CXX_STANDARD 14)

target_link_libraries(gtda_bottleneck LINK_PUBLIC ${Boost_LIBRARIES})
target_compile_definitions(gtda_bottleneck PRIVATE BOOST_RESULT_OF_USE_DECLTYPE=1 BOOST_ALL_NO_LIB=1 BOOST_SYSTEM_NO_DEPRECATED=1)

Expand All @@ -96,6 +104,7 @@ endif()
#######################################################################

pybind11_add_module(gtda_cubical_complex "${BINDINGS_DIR}/cubical_complex_bindings.cpp")
set_property(TARGET gtda_cubical_complex PROPERTY CXX_STANDARD 14)

if(OpenMP_FOUND)
target_link_libraries(gtda_cubical_complex PRIVATE OpenMP::OpenMP_CXX)
Expand All @@ -120,6 +129,7 @@ endif()
#######################################################################

pybind11_add_module(gtda_persistent_cohomology "${BINDINGS_DIR}/persistent_cohomology_bindings.cpp")
set_property(TARGET gtda_persistent_cohomology PROPERTY CXX_STANDARD 14)

if(OpenMP_FOUND)
target_link_libraries(gtda_persistent_cohomology PRIVATE OpenMP::OpenMP_CXX)
Expand All @@ -146,6 +156,7 @@ endif()
#######################################################################

pybind11_add_module(gtda_simplex_tree "${BINDINGS_DIR}/simplex_tree_bindings.cpp")
set_property(TARGET gtda_simplex_tree PROPERTY CXX_STANDARD 14)

if(OpenMP_FOUND)
target_link_libraries(gtda_simplex_tree PRIVATE OpenMP::OpenMP_CXX)
Expand Down Expand Up @@ -174,6 +185,7 @@ endif()
#######################################################################

pybind11_add_module(gtda_periodic_cubical_complex "${BINDINGS_DIR}/periodic_cubical_complex_bindings.cpp")
set_property(TARGET gtda_periodic_cubical_complex PROPERTY CXX_STANDARD 14)

if(OpenMP_FOUND)
target_link_libraries(gtda_periodic_cubical_complex PRIVATE OpenMP::OpenMP_CXX)
Expand All @@ -200,6 +212,7 @@ endif()
#######################################################################

pybind11_add_module(gtda_witness_complex "${BINDINGS_DIR}/witness_complex_bindings.cpp")
set_property(TARGET gtda_witness_complex PROPERTY CXX_STANDARD 14)

if(OpenMP_FOUND)
target_link_libraries(gtda_witness_complex PRIVATE OpenMP::OpenMP_CXX)
Expand Down Expand Up @@ -228,6 +241,7 @@ endif()
#######################################################################

pybind11_add_module(gtda_strong_witness_complex "${BINDINGS_DIR}/strong_witness_complex_bindings.cpp")
set_property(TARGET gtda_strong_witness_complex PROPERTY CXX_STANDARD 14)

if(OpenMP_FOUND)
target_link_libraries(gtda_strong_witness_complex PRIVATE OpenMP::OpenMP_CXX)
Expand Down Expand Up @@ -256,6 +270,7 @@ endif()
#######################################################################

pybind11_add_module(gtda_sparse_rips_complex "${BINDINGS_DIR}/rips_complex_bindings.cpp")
set_property(TARGET gtda_sparse_rips_complex PROPERTY CXX_STANDARD 14)

if(OpenMP_FOUND)
target_link_libraries(gtda_sparse_rips_complex PRIVATE OpenMP::OpenMP_CXX)
Expand Down Expand Up @@ -285,6 +300,7 @@ endif()
#######################################################################

pybind11_add_module(gtda_cech_complex "${BINDINGS_DIR}/cech_complex_bindings.cpp")
set_property(TARGET gtda_cech_complex PROPERTY CXX_STANDARD 14)

if(OpenMP_FOUND)
target_link_libraries(gtda_cech_complex PRIVATE OpenMP::OpenMP_CXX)
Expand Down
14 changes: 0 additions & 14 deletions CODE_AUTHORS

This file was deleted.

15 changes: 15 additions & 0 deletions CODE_AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
The following is the list of code authors of the ``giotto-tda`` python package.

Where component authors are known, add them here.

| Guillaume Tauzin, [email protected]
| Umberto Lupo, [email protected]
| Lewis Tunstall, [email protected]
| Matteo Caorsi, [email protected]
| Philippe Nguyen, [email protected]
| Julian Burella Pérez, [email protected]
| Alessio Ghiraldello, [email protected]
| Adélie Garin, [email protected]
| Anibal Medina-Mardones, [email protected]
| Wojciech Reise, [email protected]
| Roman Yurchak, [email protected]
7 changes: 0 additions & 7 deletions CODE_OWNERS

This file was deleted.

5 changes: 5 additions & 0 deletions CODE_OWNERS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
The following is the list of code owners of the ``giotto-tda`` Python package:

- L2F SA
- EPFL - Ecole Polytechnique Fédérale de Lausanne
- REDS Institute of the Haut Ecole d'Ingénierie et Gestion du canton Vaud
1 change: 0 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ The latest stable version of ``giotto-tda`` requires:
- joblib (>= 0.13)
- scikit-learn (>= 0.22.0)
- python-igraph (>= 0.7.1.post6)
- matplotlib (>= 3.0.3)
- plotly (>= 4.4.1)
- ipywidgets (>= 7.5.1)

Expand Down
12 changes: 7 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

- task: Cache@2
inputs:
key: '"ccache-wheels-v2020.04.07" | $(Agent.OS) | "$(python.version)"'
key: '"ccache-wheels-v2020.05.12" | $(Agent.OS) | "$(python.version)"'
path: $(CCACHE_DIR)
displayName: ccache

Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
- script: |
set -e
pip install pandas openml
pip install pandas openml matplotlib
pip install "papermill==1.2.1"
cd examples
for n in *.ipynb
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
- task: Cache@2
inputs:
key: '"ccache-v2020.04.07" | $(Agent.OS) | "$(python.version)"'
key: '"ccache-v2020.05.12" | $(Agent.OS) | "$(python.version)"'
path: $(CCACHE_DIR)
displayName: ccache

Expand Down Expand Up @@ -246,9 +246,11 @@ jobs:
condition: eq(variables['nightly_check'], 'true')
displayName: 'Change name to giotto-tda-nightly'
# Set BOOST_ROOT_PIPELINE to the version used in the pipeline
# See https://github.com/actions/virtual-environments/issues/687#issuecomment-616345933
- script: |
python .azure-ci/install_boost.py || exit /b
displayName: 'Install boost'
echo "##vso[task.setvariable variable=BOOST_ROOT_PIPELINE]%BOOST_ROOT_1_72_0%"
displayName: 'Set env variable for boost version'
- script: |
python -m pip install --upgrade pip setuptools
Expand Down
12 changes: 12 additions & 0 deletions cmake/HelperBoost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ if(WIN32)
list(APPEND BOOST_ROOT "") # Add custom path to your boost installation
endif()

# Changes introduced in latest version of the giotto-tda Azure pipelines produce
# compilation errors because CMake cannot find boost header files.
# After discussing in https://github.com/actions/virtual-environments/issues/687
# this solution is used due to custom paths in the Azure setup.
message(STATUS "BOOST_ROOT_PIPELINE: $ENV{BOOST_ROOT_PIPELINE}")
if(DEFINED ENV{BOOST_ROOT_PIPELINE})
file(TO_CMAKE_PATH $ENV{BOOST_ROOT_PIPELINE} CMAKE_BOOST_ROOT)
list(APPEND BOOST_ROOT "${CMAKE_BOOST_ROOT}")
list(APPEND BOOST_INCLUDEDIR "${CMAKE_BOOST_ROOT}/boost/include")
list(APPEND BOOST_LIBRARYDIR "${CMAKE_BOOST_ROOT}/lib")
endif()

message(STATUS "BOOST_ROOT: ${BOOST_ROOT}")

find_package(Boost 1.56 REQUIRED)
Expand Down
1 change: 0 additions & 1 deletion doc/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ The latest stable version of giotto-tda requires:
- joblib (>= 0.13)
- scikit-learn (>= 0.22.0)
- python-igraph (>= 0.7.1.post6)
- matplotlib (>= 3.0.3)
- plotly (>= 4.4.1)
- ipywidgets (>= 7.5.1)

Expand Down
4 changes: 2 additions & 2 deletions doc/library.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,5 @@ What's new

.. include::
release.rst
:start-after: Release 0.2.1
:end-before: Release 0.2.0
:start-after: Release 0.2.2
:end-before: Release 0.2.1
62 changes: 60 additions & 2 deletions doc/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,65 @@ Release Notes

.. _stable:

*************
Release 0.2.2
*************

Major Features and Improvements
===============================

- The documentation for ``gtda.mapper.utils.decorators.method_to_transform`` has been improved.
- A table of contents has been added to the theory glossary.
- The theory glossary has been restructured by including a section titled "Analysis". Entries for l^p norms, L^p norms and heat vectorization have been added.
- The project's Azure CI for Windows versions has been sped-up by ensuring that the locally installed boost version is detected.
- Several python bindings to external code from GUDHI, ripser.py and Hera have been made public: specifically, ``from gtda.externals import *`` now gives power users access to:

- ``bottleneck_distance``,
- ``wasserstein_distance``,
- ``ripser``,
- ``SparseRipsComplex``,
- ``CechComplex``,
- ``CubicalComplex``,
- ``PeriodicCubicalComplex``,
- ``SimplexTree``,
- ``WitnessComplex``,
- ``StrongWitnessComplex``.

However, these functionalities are still undocumented.
- The ``gtda.mapper.visualisation`` and ``gtda.mapper.utils._visualisation`` modules have been thoroughly refactored to improve code clarity, add functionality, change behaviour and fix bugs. Specifically, in figures generated by both ``plot_static_mapper_graph`` and ``plot_interactive_mapper_graph``:

- The colorbar no longer shows values rescaled to the interval [0, 1]. Instead, it always shows the true range of node summary statistics.
- The values of the node summary statistics are now displayed in the hovertext boxes. A a new keyword argument ``n_sig_figs`` controls their rounding (3 is the default).
- ``plotly_kwargs`` has been renamed to ``plotly_params`` (see "Backwards-Incompatible Changes" below).
- The dependency on ``matplotlib``'s ``rgb2hex`` and ``get_cmap`` functions has been removed. As no other component in ``giotto-tda`` required ``matplotlib``, the dependency on this library has been removed completely.
- A ``node_scale`` keyword argument has been added which can be used to controls the size of nodes (see "Backwards-Incompatible Changes" below).
- The overall look of Mapper graphs has been improved by increasing the opacity of node colors so that edges do not hide them, and by reducing the thickness of marker lines.

Furthermore, a ``clone_pipeline`` keyword argument has been added to ``plot_interactive_mapper_graph``, which when set to ``False`` allows the user to mutate the input pipeline via the interactive widget.

- The docstrings of ``plot_static_mapper_graph``, ``plot_interactive_mapper_graph`` and ``make_mapper_pipeline`` have been improved.

Bug Fixes
=========

- A CI bug introduced by an update to the XCode compiler installed on the Azure Mac machines has been fixed.
- A bug afflicting Mapper colors, which was due to an incorrect rescaling to [0, 1], has been fixed.

Backwards-Incompatible Changes
==============================

- The keyword parameter ``plotly_kwargs`` in ``plot_static_mapper_graph`` and ``plot_interactive_mapper_graph`` has been renamed to ``plotly_params`` and has now slightly different specifications. A new logic controls how the information contained in ``plotly_params`` is used to update plotly figures.
- The function ``get_node_sizeref`` in ``gtda.mapper.utils.visualization`` has been hidden by renaming it to ``_get_node_sizeref``. Its main intended use is subsumed by the new ``node_scale`` parameter of ``plot_static_mapper_graph`` and ``plot_interactive_mapper_graph``.

Thanks to our Contributors
==========================

This release contains contributions from many people:

Umberto Lupo, Julian Burella Pérez, Anibal Medina-Mardones, Wojciech Reise and Guillaume Tauzin.

We are also grateful to all who filed issues or helped resolve them, asked and answered questions, and were part of inspiring discussions.

*************
Release 0.2.1
*************
Expand Down Expand Up @@ -41,8 +100,7 @@ This release contains contributions from many people:

Umberto Lupo, Anibal Medina-Mardones, Julian Burella Pérez, Guillaume Tauzin, and Wojciech Reise.

We are also grateful to all who filed issues or helped resolve them, asked and answered questions, and were part of
inspiring discussions.
We are also grateful to all who filed issues or helped resolve them, asked and answered questions, and were part of inspiring discussions.

*************
Release 0.2.0
Expand Down
18 changes: 18 additions & 0 deletions doc/theory/bibliography.bib
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,24 @@ @incollection{takens1981detecting
publisher={Springer}
}

@article{adams2017persistence,
title={Persistence images: A stable vector representation of persistent homology},
author={Adams, Henry and Emerson, Tegan and Kirby, Michael and Neville, Rachel and Peterson, Chris and Shipman, Patrick and Chepushtanova, Sofya and Hanson, Eric and Motta, Francis and Ziegelmeier, Lori},
journal={The Journal of Machine Learning Research},
volume={18},
number={1},
pages={218--252},
year={2017},
publisher={JMLR. org}
}

@inproceedings{reininghaus2015stable,
title={A stable multi-scale kernel for topological machine learning},
author={Reininghaus, Jan and Huber, Stefan and Bauer, Ulrich and Kwitt, Roland},
booktitle={Proceedings of the {IEEE} conference on computer vision and pattern recognition},
pages={4741--4748},
year={2015}
}

@inproceedings{chazal2014stochastic,
address = {Kyoto, Japan},
Expand Down
Loading

0 comments on commit a0f709b

Please sign in to comment.