Open MarioAuditore opened 1 day ago
Hi Mario,
from what I'm looking at, your data[0]
looks like a correlation matrix, which does not look like distance matrix ---I think the segfault comes from here. --> I agree that Gudhi should handle that better.
A solution can be to give a distance between points given by 1-data[0]
instead, i.e., points that are close together in terms of correlation will be connected sooner.
Indeed. The code will only look at the (strict) lower triangular matrix, but you have negative values in this matrix, so we end up with edges that have a filtration value smaller than that of the vertices (0), which violates the definition of a filtration. We could add some tests to avoid crashing the Python interpreter. Testing if a SimplexTree is a proper filtration may be a bit expensive though.
I tried to play around with covariance matrices from geomstats:
However this code just instantly kills the jupyter kernel. Python 3.11.4 on MacOS, M1 pro