A Python library for computing persistent homology cost and related topological data analysis tools.
- Python 3.8 or higher
- pip
- Clone the repository:
git clone https://github.com/habla-liaa/persistent-cost.git
cd persistent-cost- Install in editable mode (recommended for development):
pip install -e .This will automatically install all required dependencies:
- numpy
- scipy
- pandas
- matplotlib
- gudhi
To install additional testing tools:
pip install -e ".[dev]"The fast Numba and Cython versions of the pivot algorithm are packaged as optional extras:
pip install -e ".[accel]"After installing the extra, build the Cython extension in-place (required once per environment):
python setup.py build_ext --inplaceThe accelerated variants live in persistent_cost.utils.algorithms_fast and expose helpers such as
do_pivot_fast, do_pivot_numba, and do_pivot_cython.
pytest tests/pytest tests/test_utils.py -vpytest tests/ --cov=persistent_cost --cov-report=htmlpython tests/test_utils.pyInstall the development extras to pull in the Fire CLI helper, ensure at least one accelerated backend is available, then compare runtimes:
pip install -e ".[dev]"
python -m benchmarks.benchmark_pivot benchmark --points=10,30,50 --repeats=5Use --progress=False to disable progress bars or override any of the other parameters, e.g.
--threshold=0.4 --maxdim=3.
- Manuela Cerdeiro
- Pablo Riera
- Thiago Tiracha
- Francisco Gozzi
- que tolere nubes de un solo punto