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

Clarify tomato warning about large dimension #1059

Closed mglisse closed 2 weeks ago

mglisse commented 1 month ago

The documentation of DTMDensity says

When the dimension is high, using it as an exponent can quickly lead to under- or overflows. We recommend using a small fixed value instead in those cases, even if it won’t have the same nice theoretical properties as the dimension.

(we could be clearer that this means passing for instance dim=2 and either q=2 or not specifying q, but it says the right thing)

The documentation for Tomato says

q (float) – order used to compute the distance to measure. Defaults to dim. Beware that when the dimension is large, this can easily cause overflows.

dim (float) – final exponent in DTM density estimation, representing the dimension. Defaults to the dimension, or 2 when the dimension cannot be read from the input (metric is “precomputed”).

That is, it recommends passing just q=2 if the dimension is large, but if we don't set dim at the same time that leads to under/overflow in DTMDensity.