GUDHI / gudhi-devel

The GUDHI library is a generic open source C++ library, with a Python interface, for Topological Data Analysis (TDA) and Higher Dimensional Geometry Understanding.
https://gudhi.inria.fr/
MIT License
245 stars 65 forks source link

Can I calculate the L_p norm of the persistence landscape using the python interface of the GUDHI library? #1045

Closed whsm closed 1 month ago

whsm commented 2 months ago

Can I calculate the L_p norm of the persistence landscape using the python interface of the GUDHI library?

VincentRouvreau commented 2 months ago

This is not integrated directly in GUDHI as the computation is just few lines of code. You can check in example https://github.com/GUDHI/tda_financial_time_series_notebook where the L_p norm is given as a scikit-learn class to be able to use it in a scikit-learn pipeline (cf. https://github.com/GUDHI/tda_financial_time_series_notebook/blob/master/tda_web_app.ipynb )

mglisse commented 1 month ago

The landscape appears as a numpy array, so you can use the corresponding numpy function directly https://numpy.org/doc/stable/reference/generated/numpy.linalg.norm.html