Skip to content

Commit a0f709b

Browse files
ulupoammedmarammedmarreds-heiggtauzin
authored
Create giotto-tda v0.2.2 (#414)
* 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]>
1 parent e938598 commit a0f709b

27 files changed

+1208
-796
lines changed

.azure-ci/install_boost.py

-23
This file was deleted.

.gitignore

+4-3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ gtda/externals/pybind11
4242
.pytest_cache/
4343
.hypothesis/
4444

45+
# Pytest output files
46+
test-output.xml
47+
4548
# Latex
4649
*.aux
4750
*.bbl
@@ -50,7 +53,5 @@ gtda/externals/pybind11
5053
*.log
5154
*.pdf
5255
*.synctex.gz
56+
*.toc
5357
doc/theory/glossary_backup
54-
55-
# development
56-
tda/mapper/scratch/

CMakeLists.txt

+18-2
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ set(HERA_DIR "gtda/externals/hera")
1818
#######################################################################
1919

2020
pybind11_add_module(gtda_ripser "${BINDINGS_DIR}/ripser_bindings.cpp")
21+
set_property(TARGET gtda_ripser PROPERTY CXX_STANDARD 14)
22+
2123
if(OpenMP_FOUND)
2224
target_link_libraries(gtda_ripser PRIVATE OpenMP::OpenMP_CXX)
2325
endif()
24-
target_compile_definitions(gtda_ripser PRIVATE ASSEMBLE_REDUCTION_MATRIX=1)
2526

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

2830
if(MSVC)
@@ -38,11 +40,13 @@ endif()
3840
#######################################################################
3941

4042
pybind11_add_module(gtda_ripser_coeff "${BINDINGS_DIR}/ripser_bindings.cpp")
43+
set_property(TARGET gtda_ripser_coeff PROPERTY CXX_STANDARD 14)
44+
4145
if(OpenMP_FOUND)
4246
target_link_libraries(gtda_ripser_coeff PRIVATE OpenMP::OpenMP_CXX)
4347
endif()
44-
target_compile_definitions(gtda_ripser_coeff PRIVATE USE_COEFFICIENTS=1 ASSEMBLE_REDUCTION_MATRIX=1)
4548

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

4852
if(MSVC)
@@ -58,6 +62,8 @@ endif()
5862
#######################################################################
5963

6064
pybind11_add_module(gtda_wasserstein ${BINDINGS_DIR}/wasserstein_bindings.cpp)
65+
set_property(TARGET gtda_wasserstein PROPERTY CXX_STANDARD 14)
66+
6167
target_link_libraries(gtda_wasserstein LINK_PUBLIC ${Boost_LIBRARIES})
6268
target_compile_definitions(gtda_wasserstein PRIVATE BOOST_RESULT_OF_USE_DECLTYPE=1 BOOST_ALL_NO_LIB=1 BOOST_SYSTEM_NO_DEPRECATED=1)
6369

@@ -77,6 +83,8 @@ endif()
7783
#######################################################################
7884

7985
pybind11_add_module(gtda_bottleneck "${BINDINGS_DIR}/bottleneck_bindings.cpp")
86+
set_property(TARGET gtda_bottleneck PROPERTY CXX_STANDARD 14)
87+
8088
target_link_libraries(gtda_bottleneck LINK_PUBLIC ${Boost_LIBRARIES})
8189
target_compile_definitions(gtda_bottleneck PRIVATE BOOST_RESULT_OF_USE_DECLTYPE=1 BOOST_ALL_NO_LIB=1 BOOST_SYSTEM_NO_DEPRECATED=1)
8290

@@ -96,6 +104,7 @@ endif()
96104
#######################################################################
97105

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

100109
if(OpenMP_FOUND)
101110
target_link_libraries(gtda_cubical_complex PRIVATE OpenMP::OpenMP_CXX)
@@ -120,6 +129,7 @@ endif()
120129
#######################################################################
121130

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

124134
if(OpenMP_FOUND)
125135
target_link_libraries(gtda_persistent_cohomology PRIVATE OpenMP::OpenMP_CXX)
@@ -146,6 +156,7 @@ endif()
146156
#######################################################################
147157

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

150161
if(OpenMP_FOUND)
151162
target_link_libraries(gtda_simplex_tree PRIVATE OpenMP::OpenMP_CXX)
@@ -174,6 +185,7 @@ endif()
174185
#######################################################################
175186

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

178190
if(OpenMP_FOUND)
179191
target_link_libraries(gtda_periodic_cubical_complex PRIVATE OpenMP::OpenMP_CXX)
@@ -200,6 +212,7 @@ endif()
200212
#######################################################################
201213

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

204217
if(OpenMP_FOUND)
205218
target_link_libraries(gtda_witness_complex PRIVATE OpenMP::OpenMP_CXX)
@@ -228,6 +241,7 @@ endif()
228241
#######################################################################
229242

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

232246
if(OpenMP_FOUND)
233247
target_link_libraries(gtda_strong_witness_complex PRIVATE OpenMP::OpenMP_CXX)
@@ -256,6 +270,7 @@ endif()
256270
#######################################################################
257271

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

260275
if(OpenMP_FOUND)
261276
target_link_libraries(gtda_sparse_rips_complex PRIVATE OpenMP::OpenMP_CXX)
@@ -285,6 +300,7 @@ endif()
285300
#######################################################################
286301

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

289305
if(OpenMP_FOUND)
290306
target_link_libraries(gtda_cech_complex PRIVATE OpenMP::OpenMP_CXX)

CODE_AUTHORS

-14
This file was deleted.

CODE_AUTHORS.rst

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
The following is the list of code authors of the ``giotto-tda`` python package.
2+
3+
Where component authors are known, add them here.
4+
5+
| Guillaume Tauzin, [email protected]
6+
| Umberto Lupo, [email protected]
7+
| Lewis Tunstall, [email protected]
8+
| Matteo Caorsi, [email protected]
9+
| Philippe Nguyen, [email protected]
10+
| Julian Burella Pérez, [email protected]
11+
| Alessio Ghiraldello, [email protected]
12+
| Adélie Garin, [email protected]
13+
| Anibal Medina-Mardones, [email protected]
14+
| Wojciech Reise, [email protected]
15+
| Roman Yurchak, [email protected]

CODE_OWNERS

-7
This file was deleted.

CODE_OWNERS.rst

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
The following is the list of code owners of the ``giotto-tda`` Python package:
2+
3+
- L2F SA
4+
- EPFL - Ecole Polytechnique Fédérale de Lausanne
5+
- REDS Institute of the Haut Ecole d'Ingénierie et Gestion du canton Vaud

README.rst

-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ The latest stable version of ``giotto-tda`` requires:
6868
- joblib (>= 0.13)
6969
- scikit-learn (>= 0.22.0)
7070
- python-igraph (>= 0.7.1.post6)
71-
- matplotlib (>= 3.0.3)
7271
- plotly (>= 4.4.1)
7372
- ipywidgets (>= 7.5.1)
7473

azure-pipelines.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
- task: Cache@2
4040
inputs:
41-
key: '"ccache-wheels-v2020.04.07" | $(Agent.OS) | "$(python.version)"'
41+
key: '"ccache-wheels-v2020.05.12" | $(Agent.OS) | "$(python.version)"'
4242
path: $(CCACHE_DIR)
4343
displayName: ccache
4444

@@ -73,7 +73,7 @@ jobs:
7373
7474
- script: |
7575
set -e
76-
pip install pandas openml
76+
pip install pandas openml matplotlib
7777
pip install "papermill==1.2.1"
7878
cd examples
7979
for n in *.ipynb
@@ -133,7 +133,7 @@ jobs:
133133
134134
- task: Cache@2
135135
inputs:
136-
key: '"ccache-v2020.04.07" | $(Agent.OS) | "$(python.version)"'
136+
key: '"ccache-v2020.05.12" | $(Agent.OS) | "$(python.version)"'
137137
path: $(CCACHE_DIR)
138138
displayName: ccache
139139

@@ -246,9 +246,11 @@ jobs:
246246
condition: eq(variables['nightly_check'], 'true')
247247
displayName: 'Change name to giotto-tda-nightly'
248248
249+
# Set BOOST_ROOT_PIPELINE to the version used in the pipeline
250+
# See https://github.com/actions/virtual-environments/issues/687#issuecomment-616345933
249251
- script: |
250-
python .azure-ci/install_boost.py || exit /b
251-
displayName: 'Install boost'
252+
echo "##vso[task.setvariable variable=BOOST_ROOT_PIPELINE]%BOOST_ROOT_1_72_0%"
253+
displayName: 'Set env variable for boost version'
252254
253255
- script: |
254256
python -m pip install --upgrade pip setuptools

cmake/HelperBoost.cmake

+12
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ if(WIN32)
77
list(APPEND BOOST_ROOT "") # Add custom path to your boost installation
88
endif()
99

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

1224
find_package(Boost 1.56 REQUIRED)

doc/installation.rst

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ The latest stable version of giotto-tda requires:
1616
- joblib (>= 0.13)
1717
- scikit-learn (>= 0.22.0)
1818
- python-igraph (>= 0.7.1.post6)
19-
- matplotlib (>= 3.0.3)
2019
- plotly (>= 4.4.1)
2120
- ipywidgets (>= 7.5.1)
2221

doc/library.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,5 +114,5 @@ What's new
114114

115115
.. include::
116116
release.rst
117-
:start-after: Release 0.2.1
118-
:end-before: Release 0.2.0
117+
:start-after: Release 0.2.2
118+
:end-before: Release 0.2.1

doc/release.rst

+60-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,65 @@ Release Notes
55

66
.. _stable:
77

8+
*************
9+
Release 0.2.2
10+
*************
11+
12+
Major Features and Improvements
13+
===============================
14+
15+
- The documentation for ``gtda.mapper.utils.decorators.method_to_transform`` has been improved.
16+
- A table of contents has been added to the theory glossary.
17+
- 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.
18+
- The project's Azure CI for Windows versions has been sped-up by ensuring that the locally installed boost version is detected.
19+
- 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:
20+
21+
- ``bottleneck_distance``,
22+
- ``wasserstein_distance``,
23+
- ``ripser``,
24+
- ``SparseRipsComplex``,
25+
- ``CechComplex``,
26+
- ``CubicalComplex``,
27+
- ``PeriodicCubicalComplex``,
28+
- ``SimplexTree``,
29+
- ``WitnessComplex``,
30+
- ``StrongWitnessComplex``.
31+
32+
However, these functionalities are still undocumented.
33+
- 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``:
34+
35+
- The colorbar no longer shows values rescaled to the interval [0, 1]. Instead, it always shows the true range of node summary statistics.
36+
- 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).
37+
- ``plotly_kwargs`` has been renamed to ``plotly_params`` (see "Backwards-Incompatible Changes" below).
38+
- 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.
39+
- A ``node_scale`` keyword argument has been added which can be used to controls the size of nodes (see "Backwards-Incompatible Changes" below).
40+
- 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.
41+
42+
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.
43+
44+
- The docstrings of ``plot_static_mapper_graph``, ``plot_interactive_mapper_graph`` and ``make_mapper_pipeline`` have been improved.
45+
46+
Bug Fixes
47+
=========
48+
49+
- A CI bug introduced by an update to the XCode compiler installed on the Azure Mac machines has been fixed.
50+
- A bug afflicting Mapper colors, which was due to an incorrect rescaling to [0, 1], has been fixed.
51+
52+
Backwards-Incompatible Changes
53+
==============================
54+
55+
- 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.
56+
- 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``.
57+
58+
Thanks to our Contributors
59+
==========================
60+
61+
This release contains contributions from many people:
62+
63+
Umberto Lupo, Julian Burella Pérez, Anibal Medina-Mardones, Wojciech Reise and Guillaume Tauzin.
64+
65+
We are also grateful to all who filed issues or helped resolve them, asked and answered questions, and were part of inspiring discussions.
66+
867
*************
968
Release 0.2.1
1069
*************
@@ -41,8 +100,7 @@ This release contains contributions from many people:
41100

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

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

47105
*************
48106
Release 0.2.0

doc/theory/bibliography.bib

+18
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,24 @@ @incollection{takens1981detecting
77
publisher={Springer}
88
}
99

10+
@article{adams2017persistence,
11+
title={Persistence images: A stable vector representation of persistent homology},
12+
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},
13+
journal={The Journal of Machine Learning Research},
14+
volume={18},
15+
number={1},
16+
pages={218--252},
17+
year={2017},
18+
publisher={JMLR. org}
19+
}
20+
21+
@inproceedings{reininghaus2015stable,
22+
title={A stable multi-scale kernel for topological machine learning},
23+
author={Reininghaus, Jan and Huber, Stefan and Bauer, Ulrich and Kwitt, Roland},
24+
booktitle={Proceedings of the {IEEE} conference on computer vision and pattern recognition},
25+
pages={4741--4748},
26+
year={2015}
27+
}
1028

1129
@inproceedings{chazal2014stochastic,
1230
address = {Kyoto, Japan},

0 commit comments

Comments
 (0)