giotto-ai / giotto-tda

A high-performance topological machine learning toolbox in Python
https://giotto-ai.github.io/gtda-docs
Other
858 stars 175 forks source link

Computing L^p Norms (specificically L^1 norm) from persistence diagram #628

Closed anmolguppta closed 2 years ago

anmolguppta commented 2 years ago

Hi, I am a junior undergraduate student from India and am researching on Application of TDA on stocks. The data I'm working with is financial time series data.

I'm trying to replicate a paper - ( TDA in investment decisions.pdf )

Where in the algorithm 2 ( Pg 7), a TDA norm value is being obtained by applying the takens' embedding theorem on the one dimensional time series to obtain point cloud data set, from which persistence diagrams are calculated. From there the persistence landscape are being calculated which are then finally used to obtain L1 norms.

I've also attached the snapshot of the algorithm below -

Screenshot 2022-04-08 at 1 52 21 AM

The issue I'm currently facing is, that I've reached till the step of computing the persistence diagrams using Vietoris Rips, thanks to the examples given in the glossary.

However, I'm confused and am not able to understand as in how to proceed further to compute the L^1 norm and which function should I use? As well as how the values obtained from persistence diagram would be fed as an input to that function? There are several different distance measure parameters mentioned in the glossary such as Wasserstein, however I'm confused which one should I use and how?

I'm stuck here since quite a bit of time and am having thoughts to instead switch to R (Even though I've never worked before with R) as there was some references available on R on net but I couldn't find any for Python.

I'm an undergrad student and am exploring this field in addition to my coursework mainly due to my own interest. I am very new to this and don't have great in depth knowledge of algebraic topology before hand. I am learning python side by side and the examples provided in the glossary have been of great help till now. But, I couldn't find any examples related to L-norms.

Please excuse me if GitHub is not the right place to ask this type of questions, but any kind of help in any way would be really appreciated! :)

ulupo commented 2 years ago

I think you may want to look at Amplitude: https://giotto-ai.github.io/gtda-docs/0.5.1/modules/generated/diagrams/features/gtda.diagrams.Amplitude.html#gtda.diagrams.Amplitude (and more generally to the diagrams subpackage (https://giotto-ai.github.io/gtda-docs/0.5.1/modules/diagrams.html). Let me know if that helps!