You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: paper/paper.md
+23-36Lines changed: 23 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: 'ECT: A Python Package for the Euler Characteristic Transform'
2
+
title: '`ect`: A Python Package for the Euler Characteristic Transform'
3
3
tags:
4
4
- Python
5
5
- Topological Data Analysis
@@ -40,45 +40,32 @@ The `ect` Python package offers a fast and well-documented implementation of ECT
40
40
41
41
## The Euler Characteristic Transform
42
42
43
-
We give a high level introduction of the ECT here as defined in [@Turner2014], and direct the reader to [@Munch2025] for a full survey article specifically on the subject. Further, note that the code is built to handle embedded cell complexes of arbitrary dimension, but for ease of introduction, we explain the basics using embedded graphs.
43
+
The Euler characteristic is a standard construction from algebraic topology (See e.g. [@Hatcher]).
44
+
In its simplest form, for a given polyhedron $K$, it is defined as the alternating sum $\chi(K) = v_K-e_K+f_K$ where $v_K$, $e_K$, and $f_K$ stand for the counts of the numbers of vertices, edges, and faces in $K$, respectively.
45
+
The Euler Characteristic Transform (ECT) extends this idea to encode the changing Euler characteristic for sublevelsets of an input space in different directions.
46
+
We give a high level introduction of the ECT here as defined in [@Turner2014], and direct the reader to [@Munch2025] for a full survey article specifically on the subject.
47
+
<!-- Further, note that the code is built to handle embedded cell complexes of arbitrary dimension, but for ease of introduction, we explain the basics using embedded graphs. -->
44
48
45
-
To start, we assume our input is an undirected graph $G$ with a straight-line embedding in 2D given by a map on the vertices $f: V(G) \to \mathbb{R}^2$. A graph can be constructed as seen in \autoref{fig:example_graph}.
49
+
To start, we have input `ect.EmbeddedComplex`, which is a polyhedral complex $K$ (See [@Goodman2018] Ch. 17.4) which is a collection of convex polytopes in $\mathbb{R}^n$ closed under the face relation. While we note the code can handle shapes in any dimension, we will give an exposition focusing on the case of a straight-line graph embedding like the example given in \autoref{fig:example_graph} embedded in $\mathbb{R}^2$.
46
50
47
-
48
-

For a choice of direction $\theta \in [0,2\pi]$, we can induce a function on the vertex set.
54
-
Thinking of this as $\omega \in \mathbb{S}^1$ by defining the unit vector $\omega = (\cos(\theta), \sin(\theta))$, the function $g_\omega$ is defined on the vertices of $G$ by taking the dot product of the embedding coordinates with the unit vector, specifically
55
-
$$
51
+
For a choice of direction $\omega \in \mathbb{S}^{n-1}$, we induce a function on the vertex set given by $
56
52
g_\omega(v) = \langle f(v), \omega\rangle.
57
-
$$
58
-
<!-- This is done in the code using the `g_omega` method as shown. -->
59
-
Some examples are shown in \autoref{fig:example_graph}.
60
-
61
-
Now we can set up the ECT for the embedded graph. The ECT is defined as
After discretizing, the example embedded graph has an ECT matrix as shown in the bottom row of \autoref{fig:example_graph}.
76
-
The main functionality of the `ECT` package is to be able to compute the ECT matrix for graphs embedded in $\mathbb{R}^d$ for $d \in \{2,3\}$.
77
63
78
64

79
65
66
+
<!--  -->
80
67
81
-
## Extension to higher dimensional embedding
68
+
<!--## Extension to higher dimensional embedding
82
69
83
70
In theory, the ECT can be defined for a space embedded in $\mathbb{R}^d$ for any $d$.
84
71
In practice, for applications geared toward encoding shapes seen in the physical world, this is largely limited to the cases $d=2$ or $d=3$.
@@ -94,25 +81,25 @@ In order to handle issues with choices of direction discretiziations, we have im
94
81
95
82
96
83
**TODO: add in stuff about the CW complex inputs**
97
-
- CW Complexes might be too broad a term. Perhaps "[polygon mesh](https://en.wikipedia.org/wiki/Polygon_mesh)" is better.
98
-
99
-
## Distances
84
+
- CW Complexes might be too broad a term. Perhaps "[polygon mesh](https://en.wikipedia.org/wiki/Polygon_mesh)" is better. -->
100
85
101
-
Additional code is included for computing distances between the resulting ECT matrices.
86
+
## Capabilities of the `ect` package
102
87
103
-

88
+
The main functionality of the `ect` package is to compute the ECT using the class `ect.ect.ECT`, including for higher dimensional structures than described in the previous section.
89
+
This can be modified to accept different choices of subsets of directions of the sphere $\mathbb{S}^{n-1}$, including uniform and random sampling methods.
90
+
Variants of the ECT are also implemented including the Smooth Euler Characteristic Transform (SECT) [ADD CITATION]; and the Differentiable Euler Characteristic Transform (DECT) [ADD CITATION].
91
+
The ECT output is also capable of easily returning distances between transforms, generally defined as the $L_p$ distance between two functions $ECT(K_1), ECT(K_2):\mathbb{S}^{n-1} \times \mathbb{R} \to \mathbb{Z}$.
104
92
105
-
## Generalized versions of ECT
93
+
<!--  -->
106
94
107
-
The ECT package provides implementations for both the Smooth Euler Characteristic Transform and the Differentiable Euler Characteristic Transform. This allows for users to quickly examine their dataset under the lense of various topological transforms to find what best suits their problem.
108
95
109
96
# Statement of Need
110
97
111
-
Despite the ECT's mathematical elegances, there has been a notable absense of efficient, user-friendly Python implementations that can handle the computational demands of modern research datasets. The ECT package addressed this by leveraging Numba's just-in-time compilation to achieve significant speedups over naive Python implementations, making it practical to compute ECTs for large-scale datasets. This performance is then complimented by the many utility functions for visualizing and comparing different Euler Characteristic Tranforms such as the ECT, SECT, and the DECT.
98
+
Despite the ECT's mathematical elegances, there has been a notable absence of efficient, user-friendly, continuously maintained Python implementations that can handle the computational demands of modern research datasets. The ECT package addressed this by leveraging Numba's just-in-time compilation to achieve significant speedups over naive Python implementations, making it practical to compute ECTs for large-scale datasets. This performance is then complimented by the many utility functions for visualizing and comparing different Euler Characteristic Tranforms such as the ECT, SECT, and the DECT.
0 commit comments