Skip to main content

Generalized computation of the weighted Euler characteristic transform using PyTorch.

Project description

pyECT

The Weighted Euler Characteristic Transform (WECT) is a mathematical tool used to analyze and summarize geometric and topological features of data. This package provides an efficient and simple implementation of the WECT using PyTorch.

This codebase accompanies this preprint. If you use this package, please include the following citation in your work:

@misc{cisewskikehe2025vectorizedcomputationeulercharacteristic,
      title={Vectorized Computation of Euler Characteristic Functions and Transforms}, 
      author={Jessi Cisewski-Kehe and Brittany Terese Fasy and Alexander McCleary and Eli Quist and Jack Ruder},
      year={2025},
      eprint={2511.03909},
      archivePrefix={arXiv},
      primaryClass={cs.CG},
      url={https://arxiv.org/abs/2511.03909}, 
}

Installation

To install pyECT, use pip:

pip install pyect 

Gudhi alpha-complex support is optional:

pip install pyect[gudhi]

The Gudhi integration lives at pyect.integrations.gudhi so Gudhi is not imported by the core package. In alpha_complex_to_filtration_data, point_weights are passed to Gudhi to construct the alpha filtration. The pyECT simplex weights are 1.0 by default; pass simplex_weight_fn to use a custom weighting rule, such as the max of the simplex vertex weights.

Usage

Here's a simple example of how to use pyECT:

from pyect import WECT

# Example data and weight function
data = [...]  # Replace with your data
weight_function = lambda x: x**2  # Replace with your weight function

# Compute the WECT
wect = WECT(data, weight_function)
result = wect.compute()

print("WECT result:", result)

For more detailed examples, please see the /examples directory.

Contributing

Contributions are welcome! If you'd like to contribute, please fork the repository and submit a pull request. For major changes, please open an issue first to discuss what you'd like to change.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyect-1.0.0.tar.gz (27.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyect-1.0.0-py3-none-any.whl (35.5 kB view details)

Uploaded Python 3

File details

Details for the file pyect-1.0.0.tar.gz.

File metadata

  • Download URL: pyect-1.0.0.tar.gz
  • Upload date:
  • Size: 27.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyect-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a4a80d42436c10cc82a4f2440b3f1c30f1142a1fa9e431793cc229da93f18c78
MD5 1e3c9f088caafb0cd115564605722938
BLAKE2b-256 e87762905c419b8fc4e8a541efa91f55672c5f9217c2bc25ccf128e97ee0b199

See more details on using hashes here.

File details

Details for the file pyect-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pyect-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 35.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyect-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c2e888231286309ae107867f7bc78d606552d28c096fd152c5f8d79d2d688230
MD5 007c2ba0c77c6e951bf11a5e156168aa
BLAKE2b-256 27c0709582fbb0800e9d63c159988dc6815a7d9fd767aafa8954a0e36e4aa8e9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page