Skip to content

habla-liaa/persistent-cost

Repository files navigation

Persistent Cost

A Python library for computing persistent homology cost and related topological data analysis tools.

Features

Installation

Prerequisites

  • Python 3.8 or higher
  • pip

Install from source

  1. Clone the repository:
git clone https://github.com/habla-liaa/persistent-cost.git
cd persistent-cost
  1. Install in editable mode (recommended for development):
pip install -e .

This will automatically install all required dependencies:

  • numpy
  • scipy
  • pandas
  • matplotlib
  • gudhi

Install with development dependencies

To install additional testing tools:

pip install -e ".[dev]"

Enable accelerated pivot backends

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 --inplace

The accelerated variants live in persistent_cost.utils.algorithms_fast and expose helpers such as do_pivot_fast, do_pivot_numba, and do_pivot_cython.

Running Tests

Run all tests

pytest tests/

Run specific test file

pytest tests/test_utils.py -v

Run tests with coverage

pytest tests/ --cov=persistent_cost --cov-report=html

Run tests directly

python tests/test_utils.py

Benchmark the pivot implementations

Install 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=5

Use --progress=False to disable progress bars or override any of the other parameters, e.g. --threshold=0.4 --maxdim=3.

Development

Authors

  • Manuela Cerdeiro
  • Pablo Riera
  • Thiago Tiracha
  • Francisco Gozzi

References

TODO:

  1. que tolere nubes de un solo punto

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors