Skip to content

Conversation

@yemeen
Copy link
Member

@yemeen yemeen commented Jul 30, 2025

add support for ECT computations on general n-faces, embeddings rules, and general speedups.

Description

combines EmbeddedGraph and EmbeddedCW into unified class EmbeddedComplex. adds an embedding validation system to allow for out of the box checking for valid embeddings with options of adding custom rules (eg. planar graphs, bounded complexes, etc). cleaned up tutorial documentation.

changed our calculation to use np.searchsorted once for all thresholds which massively brings down computation times (this was while training a model so results might be better idk)

360 Directions x 360 Thresholds

fourier_circle_100_complexity_1:
  Old ECT:      0.1152s ± 0.0064s
  New ECT:      0.0044s ± 0.0008s
  Old vs New:   26.41x

fourier_circle_1000_complexity_1:
  Old ECT:      0.1459s ± 0.0115s
  New ECT:      0.0385s ± 0.0229s
  Old vs New:   3.79x

fourier_circle_100_complexity_3:
  Old ECT:      0.1190s ± 0.0090s
  New ECT:      0.0063s ± 0.0022s
  Old vs New:   18.82x

fourier_circle_1000_complexity_3:
  Old ECT:      0.1249s ± 0.0214s
  New ECT:      0.0236s ± 0.0065s
  Old vs New:   5.29x

fourier_circle_10000_complexity_3:
  Old ECT:      0.2277s ± 0.0223s
  New ECT:      0.2032s ± 0.0423s
  Old vs New:   1.12x

fourier_circle_100000_complexity_5:
  Old ECT:      2.2604s ± 0.5787s
  New ECT:      2.3712s ± 0.3084s
  Old vs New:   0.95x

spiral_1000_complexity_2:
  Old ECT:      0.1250s ± 0.0101s
  New ECT:      0.0204s ± 0.0023s
  Old vs New:   6.12x

lemniscate_1000_complexity_3:
  Old ECT:      0.1265s ± 0.0117s
  New ECT:      0.0206s ± 0.0021s
  Old vs New:   6.15x

star_1000_complexity_5:
  Old ECT:      0.1394s ± 0.0140s
  New ECT:      0.0243s ± 0.0040s
  Old vs New:   5.73x

random_walk_1000_complexity_2:
  Old ECT:      0.1425s ± 0.0038s
  New ECT:      0.0239s ± 0.0022s
  Old vs New:   5.96x

spiral_5000_complexity_3:
  Old ECT:      0.2111s ± 0.0133s
  New ECT:      0.1163s ± 0.0154s
  Old vs New:   1.81x

star_5000_complexity_5:
  Old ECT:      0.2032s ± 0.0239s
  New ECT:      0.1141s ± 0.0113s
  Old vs New:   1.78x

Motivation and Context

want to do higher dimensions

How has this been tested?

new test classes are added

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • [x ] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • [ x] My code follows the code style of this project. (make clean)
  • [ x] I have incremented the version number in the pyproject.toml file.
  • [x ] I have added tests to cover my changes.
  • [x ] All new and existing tests passed. (make tests)

@yemeen yemeen marked this pull request as ready for review August 29, 2025 22:41
@yemeen yemeen requested a review from lizliz as a code owner August 29, 2025 22:41
@yemeen yemeen merged commit efb19f9 into main Sep 2, 2025
3 checks passed
@yemeen yemeen deleted the n-simplex branch September 2, 2025 19:55
@yemeen yemeen mentioned this pull request Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants