Any Matlab procedure to compute Peristence Diagram in a dimension higher than 3? I have the Topological Data Analysis module but the procedures go just up to dim-3
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
tanya
el 16 de Abr. de 2025
Respondida: Aditya
el 17 de Jul. de 2025
I have the Topological Data Analysis module (Matlab) but the procedures go just up to dim-3
0 comentarios
Respuesta aceptada
Aditya
el 17 de Jul. de 2025
Hi tanya ,
Currently, MATLAB’s Topological Data Analysis (TDA) module only supports computation of persistence diagrams up to dimension 3. If you need to compute persistence diagrams in higher dimensions, you will need to use an external library such as GUDHI or Ripser, which support arbitrary homology dimensions. You can interface these Python libraries with MATLAB using the built-in Python integration. Below is an example of how you might use GUDHI from MATLAB to compute persistence diagrams in higher dimensions:
% Make sure Python and GUDHI are installed and recognized by MATLAB
pyenv('Version', '/usr/bin/python3'); % Adjust the path to your Python installation
% Example data: a point cloud as a MATLAB NxD matrix
X = rand(100, 5); % 100 points in 5D
% Convert MATLAB array to Python list of lists
py_points = py.list(num2cell(X, 2));
% Create Rips complex and simplex tree in GUDHI (up to dimension 5)
rips_complex = py.gudhi.RipsComplex('points', py_points, 'max_edge_length', 2.0);
simplex_tree = rips_complex.create_simplex_tree('max_dimension', int32(5));
% Compute persistence diagram
diag = simplex_tree.persistence();
% Extract and display the persistence pairs (as a Python list of tuples)
pairs = simplex_tree.persistence_pairs();
disp(pairs)
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Statistics and Machine Learning Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!