First and foremost, I would like to thank my advisor from the University of Bordeaux, Jérémie Bigot, for accepting to supervise my study in this topic, for introducing me to optimal transport theory and for his continuous guidance and support throughout this work.

I would also like to express my gratitude to the ALGANT master program, for providing me with an opportunity to spend a year in Padova and another in Bordeaux. Specially to coordinators in each university, for all the help offered.

Thanks are also due to my friends in Padova and Bordeaux who made these two years a truly remarkable experience, despite their peculiarity. In particular to Bianca: we constantly helped each other, both in life

Preface

Don't disturb my circles!

Archimedes

Topological data analysis (TDA) is a young field that has been rapidly growing over the last years and which blends algebraic topology, statistics and computer science. It arises motivated by the fact that the topology of a space gives useful information about it. In particular, when working with scientific data, information about their internal structure may provide important properties about the phenomena that it represents or its behaviour. And sometimes this information is topological. The goal of topological data analysis is to provide well-founded mathematical, statistical and algorithmic methods to infer the topological structure underlying the data.

The aims of this thesis are two. On the one hand, to introduce this field and its mathematical tools, focusing on persistent homology and its representation by persistence diagrams. On the other hand, the study of the latter using techniques from optimal transport, proposing a vectorization based on transport maps. The thesis is divided into 6 chapters as follows.

In chapter 1 we introduce topological data analysis and its relation with simplicial complexes, which allow to turn data into geometric objects. The homotopy equivalence between these complexes and the internal structure of the data is studied through the Nerve (1.2.1) and Reconstruction theorems (1.3.8). Here we will follow basically [START_REF] Chazal | An introduction to Topological Data Analysis: fundamental and practical aspects for data scientists[END_REF], [START_REF] Ghrist | Barcodes: the persistent topology of data[END_REF] and [START_REF] Ghrist | Homological algebra and data[END_REF].

In chapter 2 we present the theory of persistent homology, the main tool of TDA. To this aim we introduce persistence modules, a mathematical object designed to carry topological information about a data set at many different scales simultaneously. This information can be compactly represented by persistence diagrams. We will focus on the case of decomposable persistence modules.

In chapter 3 the definition of persistence diagram is extended to non-decomposable modules, by taking a measure-theoretical point of view. The main goal is to introduce persitence diagrams for the general case of q-tame modules. The main reference for these last two chapters is [START_REF] Chazal | The Structure and Stability of Persistence Modules[END_REF].

In chapter 4 we focus on the study of persistence diagrams and their stability properties. Notice that, since scientific data almost always depends on a probability distribution, it is important to know the statistical behaviour of these methods. To this end, distances between persistence diagrams are introduced. In particular, the bottleneck distance and the p-th or Wasserstein distance. For this, we refer again to [START_REF] Chazal | An introduction to Topological Data Analysis: fundamental and practical aspects for data scientists[END_REF] and [START_REF] Chazal | The Structure and Stability of Persistence Modules[END_REF]. Moreover, persistence diagrams can be seen as point measures. This iii let us present the metric space of persistence diagrams with the optimal transport distance. We follow [START_REF] Figalli | A new transportation distance between nonnegative measures, with applications to gradients flows with dirichlet boundary conditions[END_REF] and [START_REF] Lacombe | Statistics for Topological Descriptors using optimal transport[END_REF].

In chapter 5 we introduce a series of vectorizations for persistence diagrams, which are necessary in order to perform linear tasks with them. In particular, linear representations are studied [START_REF] Lacombe | Statistics for Topological Descriptors using optimal transport[END_REF]. These are easy to handle vectorizations for which, using results of chapter 4, we can deduce continuity characterizations. Moreover, they include usual TDA vectorizations as persistence surfaces, silhouettes and Betti curves. Persistence landscapes [START_REF] Chazal | An introduction to Topological Data Analysis: fundamental and practical aspects for data scientists[END_REF] are also introduced. We finish by proposing a new vectorization based on transport maps.

Finally, so as to exemplify the theory, computations of the notions introduced are made. They are included, together with their representations, in a Python Jupyter Notebook. We summarize it in chapter 6. The data set used was taken from GUDHI TDA tutorial.

Furthermore, two appendixes are added for the sake of completeness. The first is a reminder of the basics of simplicial complexes and simplicial homology. The second one is a summary of the principal results on measure theory that are needed through the text.

Chapter 1

Introduction to topological data analysis

The recent field of topological data analysis (TDA) has its roots in various works in applied algebraic topology and computational geometry. The most important ones are the works due to Edelsbrunnet et al. (2002) [START_REF] Edelsbrunner | Topological persistence and simplification[END_REF] and [START_REF] Zomorodian | Computing Persistent Homology[END_REF] [START_REF] Zomorodian | Computing Persistent Homology[END_REF]. TDA exploits the fact that topological information of a space provides important properties, characteristics and invariants. Therefore, it may be used to study scientific data sets in order to obtain information about their global structure.

In this chapter we provide an introduction to the mathematical methods used in TDA to infer the topological information encoded in data. We will follow basically [START_REF] Chazal | An introduction to Topological Data Analysis: fundamental and practical aspects for data scientists[END_REF], [START_REF] Ghrist | Barcodes: the persistent topology of data[END_REF] and [START_REF] Ghrist | Homological algebra and data[END_REF]. It should be pointed out that computational aspects are crucial in TDA, and mentioned throughout the text. Indeed, robust and efficient algorithms are implemented and available, for instance, in the GUDHI library.

Introduction

Let X be a data set, i.e, a finite set of points with a notion of distance (or similarity) between them. It will be considered as a metric space on its own or a sample of a metric space, with the induced metric. For example, X may be a noisy sampling of some geometric structure, spatial coordinates obtained from some phenomena or discrete orbits of some dynamical system. Notice that we are not asking for the data to be embedded into an euclidean space, just a notion of distance.

Data sets are studied in order to obtain as much information as possible about their underlying structure. In particular, topological information might provide significant features. Nevertheless, point clouds are totally disconnected spaces with extremely simple topology. We need to assemble these discrete points into a global structure where we can study relevant topological features, and that still gives us information about the underlying shape of the data. The most obvious way to transform points X in a metric space into a global object is to use them as the vertices of a graph, whose edges are determined by proximity. Such a graph, while showing connectivity, ignores plenty of higher order features as cycles, voids, etc. Hence, simplicial complexes are built instead (see appendix A). As a result, we end up with non-topologically trivial spaces that hopefully retain the topological properties of the original space where the data comes from.

Given a data set X on a metric space (M, ρ), there are many ways of connecting n-tuples of points in order to build simplexes of dimension n and form a simplicial complex. Note that, in practice, we will only deal with finite abstract simplicial complexes. The most used in TDA are the followings. Let α > 0 be a real number. Definition 1.1.1. The Vietoris-Rips complex Rips α (X) is the collection of simplexes {x 0 , . . . , x k } where x i ∈ X are such that ρ X (x i , x j ) < α for all (i, j). That is, {x 0 , . . . , x k } is a simplex if the open balls B ρ (x i , α/2), for i = 0, . . . , k, have nonempty pairwise intersection. Definition 1.1.2. The Čech complex Čech α (X) is the set of simplexes {x 0 , . . . , x k } where x i ∈ X are such that B ρ (x 0 , α)

∩ • • • ∩ B ρ (x k , α) = ∅.
The Čech complex is just a particular case of the nerve simplicial complex (example A. 1.8) for the open cover {B ρ (x i , α)} x i ∈X .

Notice that, even if X ⊂ R m , both complexes can have higher dimension. They are related by Rips α (X) ⊆ Čech α (X) ⊆ Rips 2α (X).

(1.1) α α Remark 1.1.3. Despite having in general more simpleces, the Rips complex Rips α is computationally cheaper than the corresponding Čech complex Čech α/2 . Indeed, in order to compute the Čech complex we must remember either the entire complex and its boundary operator (i.e. the number of simpleces of each kind and how to glue them through the boundary operator) or the distances between vertices. Meanwhile, the Rips complex is a flag complex: it is maximal among all simplicial complexes with the given 1-skeleton. Consequently, it is completely determined by the 1-skeleton and can be stored as a graph and reconstituted. Since this text is not focused on the computational aspects, for forms of storage and reconstruction of simplicial complexes we refer to [START_REF] Boissonnat | The Simplex Tree: an Efficient Data Structure for General Simplicial Complexes[END_REF], with the simplex tree structure, and to [START_REF] Zomorodian | The tidy set: a minimal simplicial set for computing homology of clique complexes[END_REF] with the tidy set, especially designed for flag complexes. The drawback of Rips complexes is that homotopy equivalence results are not as immediate as those for Čech complexes, as it will be shown. ♦

1.1. INTRODUCTION

Mapper algorithm

Another possibility when constructing the simplicial complex associated to a data set X is to consider subsets of points as vertices, instead of each point being a vertex of the complex. The use of covers and their corresponding nerve complexes is perfect for this. A well chosen cover is able to highlight certain areas of interest, and the associated nerve complex provides a compact description of the relationships between these areas through their intersection patterns. This is useful when data sets are huge and we want to obtain a low dimensional representation easy to understand.

In order to chose a cover according to our needs we can proceed as follows. In the general framework, given a topological space X select a continuous function f : X → Z, where Z is called parameter space, and U = {U i } i∈I an open cover of f (X). Consider the open cover of X given by the inverse images of these open subsets {f -1 (U i )} i∈I , which is called the pull back cover induced by (f, U). Then, if a wise choice of Z, f and U has been made, the refined pull back cover, which is the collection of connected components of the open sets f -1 (U i ) for i ∈ I, provides a nerve complex which summarizes the required information. To adapt this to the case in which X is a point cloud, the Mapper algorithm has been developed in [START_REF] Singh | Topological methods for the analysis of high dimensional data sets and 3d object recognition[END_REF]. Let f : X → R m for m ≥ 1, a function called filter. In addition, consider a cover U of f (X) and compute the pull back cover. The partitioning of the opens of this cover into their connected components has to be substituted for some clustering of the inverse images. Then, we compute the nerve complex generated by these clusters. For a well chosen cover the nerve will be a graph, which has nodes corresponding to clusters in the data, but of course this method could provide higher dimensional complexes. All in all, this algorithm receives as input a data set X, a function f : X → R m and a cover U and outputs a simplicial complex. Observe that it does not need the data to be embedded into an Euclidean space.

Some examples of functions f used in the literature are density estimates (may help to understand the structure of high density areas) and distance functions to a given point.

On the other hand, if f : X → R, a standard cover choice is a finite collection of intervals {I j } j∈J . It can be parametrize by the length and the percentage overlap between successive intervals. For each of them, the inverse image is computed X j := f -1 (I j ) = {x ∈ X : f (x) ∈ I j }, providing a cover of X. Then, for each set X j , we find clusters {X jk } and compute the nerve complex of these clusters. That is, each cluster is a vertex and an edge exists between them if X jk ∩ X lt = ∅. This method can be generalized for f : X → R m with m > 1.

Finally, notice that when working with data sets a third choice is needed, the clustering method.

Remark 1.1.4. Small changes in the cover can dramatically change the output of the Mapper algorithm, which makes this method inestable. This could be solved by studying some range of the parameters of the cover and selecting the ones that turn out to provide the better output from the user perspective. ♦

Nerve theorem

All in all, the discrete set of points X has been transformed into a higher dimensional topological space from which we can obtained topological properties. It would be ideal if both are related, so that the topological features of the simplicial complex lead us to properties of the data set and its underlying structure. The following general statement holds, whose proof can be found in section 4G of [START_REF] Hatcher | Algebraic Topology[END_REF].

Theorem 1.2.1 (Nerve Theorem). Let U = {U i } i∈I be an open cover of a paracompact space X such that the intersection of any finite subcollection of the U i 's is either empty or contractible. Then, X and the nerve N (U) are homotopy equivalent.

Obviously if U consists of convex open subsets, the nerve theorem follows. That is the case of open balls in (R m , || • || q ), with 1 ≤ q ≤ ∞. Hence, if X ⊂ R m for some m > 0, Čech α (X) is homotopy equivalent to the union of balls x∈X B(x, α). We expect that, for some radius α, this union reflects the underlying structure of the data set. However, choosing the right radius is not an easy task. If α is too small no new information is obtained, whereas if it is too large all the balls will overlap. As a consequence, the best approach is not to chose just a value for α but some range of values and study how the cover and the simplicial complex evolve.

With the same idea, for a well chosen cover, the mapper algorithm also preserves the topological structure of the original space.

The following extension of the nerve theorem will be needed.

Theorem 1.2.2 (Persistent Nerve Theorem). Let X ⊆ X be two paracompact spaces and let U = {U i } i∈I and U = {U j } j∈J be two open covers, of X and X respectively. Suppose that these covers satisfy that the intersection of any finite subcollection of open subsets is either empty or contractible. Assume moreover that they are based on finite parameter sets I ⊆ J such that U i ⊆ U i for all i ∈ I.

Then, the homotopy equivalences N (U) → X and N (U ) → X provided by the nerve theorem commute with the canonical inclusions X → X and N (U) → N (U ) at homology level.

The proof is similar to the one of the nerve theorem, noticing that the canonical inclusions commute with the homotopy equivalences defined there. Anyway, it can be found in Lemma 3.4 of [START_REF] Chazal | Towards persistence-based reconstruction in euclidean spaces[END_REF].

Reconstruction theorem

Assume that the data set X is a finite discrete subset of R m , with the euclidean distance d, sampled i.i.d according to a probability measure µ with compact support M ⊂ R m . If X and M are close we expect to be able to infer topological features of M from X. This notion of closeness between compact sets is formalized as follows. Let (A, ρ) be a metric space and, for every K ⊂ A, consider the distance function ρ K : A → R + defined by ρ K (x) = inf y∈K ρ(x, y). Definition 1.3.1. The Hausdorff distance between two compact subsets K, K of a metric space (A, ρ) is defined as

d H (K, K ) = max{ sup x ∈K ρ K (x ), sup x∈K ρ K (x)} = sup x∈A |ρ K (x) -ρ K (x)| = ||ρ K -ρ K || ∞ .
From the previous section, the cover of X by open balls centered on the points of the data set is homotopy equivalent to the Čech complex. We are going to see that, under some regularity assumptions on M , one can relate the topology of this union of balls to the one of M . Therefore, by studying the Čech complex of X we may obtain topological properties of M . Definition 1.3.2. Let K ⊂ A be a compact subset of a metric space (A, ρ) and r > 0 a real number. The union of closed balls of radius r centered on K is called the r-offset of K and denoted by

K r = x∈K Bρ (x, r).
Notice that K r is just the r-sublevel set of the distance function. That is,

K r = {x ∈ A : ρ K (x) ≤ r} = ρ -1 K ([0, r]
). Let {B(x, α)} x∈X be a cover of the finite set X by open balls for the euclidean distance d. In general, it is possible to find 0 < r < α close enough to α such that the two subsets ∪ x∈X B(x, α) and ∪ x∈X B(x, r) are homotopy equivalent and, moreover, define the same Čech complex. But the latter union is just X r . As a result, the Čech complex of X is homotopy equivalent to X r . Hence, if we relate the r-offsets of M with those of X, just by studying the Čech complex of the data set we could obtain topological information about M .

All in all, it seems useful to understand the topological behaviour of the r-sublevel sets of distance functions of compact subsets. In fact, the statements are true in a more general framework.

Definition 1.3.3. A continuous function φ : R m → R + is distance-like if it is proper, i.
e. the preimage of any compact set is a compact set, and

φ 2 is semiconcave, i.e. x → ||x|| 2 -φ 2 (x) is convex. For any compact set K ⊂ R m the distance function d K is distance-like.
Remark 1.3.4. Due to semiconcavity distance-like functions have a well defined (but not continuous) notion of gradient ∇φ : R m → R m . This is essential to introduce the next notions. However, the study of semiconcave and distance-like functions is outside the scope of this text. Hence, we refer to [START_REF] Cannarsa | Semiconcave functions, Hamilton-Jacobi equations, and optimal control[END_REF] and [START_REF] Chazal | A sampling theory for compact sets in Euclidean space[END_REF] for more information. ♦ Definition 1.3.5. Let φ be a distance-like function and let φ r = φ -1 ([0, r]) be the r-sublevel set of φ.

• A point x ∈ R m is α-critical if ||∇ x φ|| ≤ α.
The corresponding value φ(x) is said to be an α-critical value. A 0-critical point (value) is simply called a critical point (value).

• The weak feature size of φ at r, denoted by wfs φ (r), is the maximum r > 0 such that φ does not have any critical value between r and r + r .

• For any 0 < α < 1 the α-reach of φ, denoted by reach α (φ), is the maximum r such that φ -1 ((0, r]) does not contain any α-critical point. The reach α (φ) is always a lower bound for the weak feature size with r = 0.

A relevant result involving distance-like functions is the ensuing isotopy lemma, which is proven in [START_REF] Grove | Critical point theory for distance functions[END_REF], proposition 1.8. Definition 1.3.6. Let X, Y ⊆ R m . We say that they are ambient isotopic if there exists a continuous map H :

[0, 1] × R m → R m such that H t = H(t, •) is a homeomorphism for every t ∈ [0, 1], H 0 = id R m and H 1 (X) = Y .
Lemma 1.3.7 (Isotopy Lemma). Let φ be a distance-like function and r 1 < r 2 two positive real numbers such that φ does not have critial points in the subset φ -1 ([r 1 , r 2 ]). Then, all φ r are isotopic for r ∈ [r 1 , r 2 ]. In particular, inclusions φ r → φ r for r < r , r, r ∈ [r 1 , r 2 ], are homotopy equivalences.

Therefore, the topology of the r-sublevel sets of distance-like functions only changes when r crosses a critical value. Then, all the sublevel sets of φ between r and r+wfs φ (r) have the same topology.

Once we have this, the next step is to obtain a connection between the sublevel sets of two different distance-like functions, in our case d M and d X .

Theorem 1.3.8 (Reconstruction Theorem [START_REF] Chazal | Geometric inference for probability measures[END_REF]). Let φ, ψ be two distance-like functions such that ||φ -ψ|| ∞ ≤ ε and reach α (φ) ≥ R for some ε > 0 and α ∈ (0, 1). Then, for every r ∈ [4ε/α 2 , R -3ε] and every η ∈ (0, R), if ε < R 5+4/α 2 , the sublevel sets ψ r and φ η are homotopy equivalent.

We need these previous results to prove the Reconstruction theorem.

Proposition 1.3.9 ( [START_REF] Chazal | Geometric inference for probability measures[END_REF]). Let φ, ψ be two distance-like functions such that ||φ -ψ|| ∞ ≤ ε. Assume that the weak feature sizes satisfy wfs φ (r) > 2ε and wfs ψ (r) > 2ε for some r > 0. Then, φ η and ψ η have the same homotopy type for all η ∈ (r, r +2ε].

Proof. Consider δ > 0 such that wfs φ (r) > 2ε + δ and wfs ψ (r) > 2ε + δ. Then, ||φ -ψ|| ∞ ≤ ε provides the following diagram, where each map is an inclusion.

φ r+δ φ r+δ+ε φ r+δ+2ε ψ r+δ ψ r+δ+ε ψ r+δ+2ε f 0 f 1 d g 0 g 1 c
Moreover, it is commutative, being the horizontal arrows f 0 , f 1 , g 0 , g 1 homotopy equivalences thanks to the isotopy lemma 1.3.7. Denote their homotopic inverses by f 1 , f 1 , g 0 , g 1 respectively. Then, a straightforward computation shows that c :

ψ r+δ+ε → φ r+δ+2ε is a homotopy equivalence with inverse g 1 • d • f 1 .
Proposition 1. 3.10 ([17]). Let φ, ψ be two distance-like functions such that ||φ -ψ|| ∞ ≤ ε. Given x any α-critical point of φ, there exist

x an α -critical point of φ such that ||x -x || ≤ 2 εφ(x), α -α ≤ 2 ε/φ(x).
In addition, if reach α (φ) ≥ R for some α, then ψ has no critical values in the interval

[4ε/α 2 , R -3ε].
Proof of Reconstruction theorem 1.3.8. First of all, notice that

ε < R 4/α 2 + 5 < R 4/α 2 + 3 ⇔ 4ε α 2 < R -3ε,
so the interval for r is nonempty. By definition of α-reach (0, R] does not contain critical values for φ. Applying the isotopy lemma this means that all φ η have the same homotopy type for η ∈ (0, R]. Therefore, it suffices to prove the result for a fix η. Let us choose η = 4ε/α 2 . It is clear that wfs φ (η) ≥ R -4ε/α 2 . Using proposition 1.3.10, ψ does not have critical values in the interval [4ε/α 2 , R -3ε], which implies that wfs ψ (η) ≥ R -3ε -4ε/α 2 . Again, isotopy lemma states that all ψ r have the same homotopy type for r ∈ [4ε/α 2 , R -3ε]. This means that, in order to finish the proof, it is enough to show that φ r and ψ r are homotopy equivalent for some r in the given range. Indeed, because of how we have chosen ε > 0, it satisfies

5ε + 4ε/α 2 < R ⇔ R -3ε -4ε/α 2 > 2ε.
By proposition 1.3.9 we can conclude that φ r is homotopy equivalent to ψ r for every r ∈ (η, η + 2ε] ⊂ (4ε/α 2 , R -3ε).

In our setting φ = d M and ψ = d X . This means that if M and X are close with respect to the hausdorff distance, for well chosen values of r and η, M η is homotopy equivalent to X r , which is again homotopy equivalent to Čech r (X). All in all, with the nerve theorem and the reconstruction theorem we are able to infer the topology of a compact space M from a simplicial complex Čech r (X) build on top of an approximate finite sample X of it. This is what we were looking for. However, there are some practical problems:

• The condition reach α (φ) = reach α (d M ) ≥ R, which could be interpreted as a regularity condition, may not always be satisfied.

• The choice of r is left to the user.

• Although the Čech complex provides an accurate topological summary of the data, it is not well-suited for data processing, as we have already mentioned in remark 1.1.3.

To overcome this last problem we only need to find topological descriptors that are simpler to handle and which could be easily computed from a complex. Algebraic topology, specially homology and, in particular, persistent homology, due to its balance between ease of computation and topological resolution is the answer. We will only consider homology groups over fields. For more information about computational aspects we refer to [START_REF] Edelsbrunner | Topological persistence and simplification[END_REF] and [START_REF] Zomorodian | Computing Persistent Homology[END_REF]. Besides, as it will be seen in the next chapter, this also let us overcome the second problem: persistent homology is able to handle homology at different scales simultaneously.

Having our eye on homology we recover the practical setting where X ⊂ R m is any finite set of points. Whenever X r and Čech r (X) are homotopy equivalent their homology groups are isomorphic, and hence they have same Betti numbers. Therefore, the reconstruction theorem can be reformulated.

Theorem 1.3.11 ([1]). Consider M ⊂ R m be a compact set such that reach α (d M ) ≥ R > 0 for some α ∈ (0, 1). Let X be a finite set of points such that

ε = d H (M, X) < R 5 + 4/α 2 .
Then, for every r ∈ [4ε/α 2 , R -3ε] and every η ∈ (0, R), the Betti numbers of Čech r (X) are equal to the Betti numbers of M η .

Proof. The hypothesis are just the ones from the reconstruction theorem with φ = d M , ψ = d X and d H (M, X) = ||φ -ψ|| ∞ = ε. Then, we use the fact that being homotopy equivalent implies having isomorphic homology groups.

Although it may happen that the homology groups of the sublevel sets M η are different from those of M , this is a rare behaviour which does not included most practical cases. Hence, the above theorem provides a method to estimate the Betti numbers of M .

We still have to deal with the problem of the condition on the α-reach of M and the computation of the Čech complex. The following theorem gives a response to this. Basically, the condition on the α-reach is exchanged for a similar condition on the weak feature size, less strict in terms of regularity, and Rips complexes substitute Čech complexes. In the following denote

X α = x∈X B(x, α) = d -1 X ((-∞, α)).
Recall that, by the nerve theorem, the homology group of X α is isomorphic to that of Čech α (X). The latter is a finite simplicial complex, so it has a finite dimensional homology group.

Theorem 1.3.12 ( [START_REF] Chazal | Towards persistence-based reconstruction in euclidean spaces[END_REF]). Let M ⊂ R m be a compact set such that wfs(M ) = wfs d M (0) ≥ R > 0 and let X be a finite set of points such that d H (M, X) < ε for some ε < 1 9 wfs(M ). Then, for any α ∈ 2ε, 1 4 (wfs(M )ε) and any η ∈ (0, R),

β n (M η ) = rk(j * ) ∀n ∈ N, (1.2)
where j * :

H n (Rips α (X)) → H n (Rips 4α (X))
is the homomorphism induced by the canonical inclusion j : Rips α (X) → Rips 4α (X).

We need two previous lemmas, being the first one a linear algebra standard result. [START_REF] Chazal | Towards persistence-based reconstruction in euclidean spaces[END_REF]). Let M ⊂ R m be a compact set and X ⊂ R m a finite set of points such that d H (M, X) < ε for some ε < 1 4 wfs(M ). Then, for all α, α ∈ [ε, wfs(M )ε] such that αα ≥ 2ε, and for all η ∈ (0, wfs(M )) we have the isomorphism

Lemma 1.3.13. Given a sequence A → B → C → D → E → F of homomorphisms between finite dimensional vector spaces, if rk(A → F ) = rk(C → D), then it is also equal to rk(B → E). Analogously, if A → B → C → D → E is a sequence of homomorphisms such that rk(A → E) = dim C, then rk(B → D) = dim C. Lemma 1.3.14 ([
H n (M η ) im(i * ) ∀n ∈ N, where i * : H n (X α ) → H n (X α ) is the homomorphism induced by the canonical inclu- sion i : X α → X α .
Proof. Observe that by hypothesis 4ε < wfs(M ), so the interval [ε, wfs(M )ε] does contain values α, α that are at distance greater than 2ε. Without loss of generality assume that ε < α < α -2ε < wfs(M ) -3ε. Notice that this is always possible, since we can change ε for any other ε ∈ (d H (M, X), ε) and, once proven for this case, the statement for ε follows. The inequality d

H (M, X) = ||d M -d X || ∞ < ε provides a sequence of inclusions M α-ε → X α → M α+ε → X α+2ε → X α → M α +ε . (1.3)
This sequence transforms into a sequence of homomorphisms between homology groups, which are vector spaces. Thanks to the isotopy lemma and the fact that α + ε < wfs(M ), all the inclusions between M α-ε , M α+ε and M α +ε induce isomorphisms. Hence, for any n ∈ N,

rk(H n (M α-ε ) → H n (M α +ε )) = dim H n (M α +ε ) = dim H n (M α+ε ). (1.4)
In addition, the homology groups of X α , X α are finite dimensional. We can use then lemma 1.3.13 and deduce from equality (1.4) that

rk(i * ) = rk(H n (X α ) → H n (X α )) = dim H n (M α+ε ).
However, for any η ∈ (0, wfs(M )) isotopy lemma gives an homotopy equivalence between M η and M α+ε . That is, dim H n (M η ) = dim H n (M α+ε ) and then equal to rk(i * ). By finiteness of these vector spaces we can conclude that im(i * ) H n (M η ).

Proof of theorem 1.3.12. First of all notice that ε < 1 9 wfs(M ) guarantees that the interval [2ε, 1 4 (wfs(M )ε)] is nonempty. Fix α in this interval. By equation (1.1) we have the next sequence of inclusions Čech α/2 (X) → Rips α (X) → Čech α (X) → Čech 2α (X) → Rips 4α (X) → Čech 4α (X), (1.5) which turns into a sequence of homomorphisms between finite vector spaces at the homology level. Consider the pairs (α 1 , α 2 ) given by (α/2, 4α) and (α, 2α). By the persistent nerve theorem 1.2.2 we have the commutative diagrams

H n ( Čech α 1 (X)) H n ( Čech α 2 (X)) H n (X α 1 ) H n (X α 2 ) k * i *
where the vertical arrows are isomorphisms and the horizontal ones are induced by inclusions. Since ε ≤ α 1 < α 2 ≤ wfs(M )ε and α 2α 1 ≥ 2ε, lemma 1.3.14 can be applied for the pairs (α 1 , α 2 ). As a result, for any n ∈ N and η

∈ (0, R), dim H n (M η ) = rk(i * ) = rk(k * )
, where the last equality follows from the commutative diagram. In particular, for the pairs of parameters chosen we obtain

rk(H n ( Čech α/2 (X)) → H n ( Čech 4α (X))) = dim H n (M η ) = rk(H n ( Čech α (X)) → H n ( Čech 2α (X)))
This, together with the sequence of homomorphisms that comes from (1.5) and lemma 1.3.13, leads to dim H n (M η ) = rk(H n (Rips α (X)) → H n (Rips 4α (X))) as wanted.

Notice that j * relates the homology of two Vietoris-Rips complexes of the same data set but on different scales. In fact, Rips α (X) ⊆ Rips 4α (X). Therefore, our next step should be to study the homology groups of nested simplicial complexes, for several values of r, and how they are related. This connects also with the problem of the choice of the scale r: it is a better strategy to consider some range of values. If we could encode this information we would be able to explain how homology evolves throughout the sequence of complexes: homology classes are born, can merge, split, die or persist, some are essential (those that persist over a significant parameter range), others might be omitted (those that die just after being born), ....

Chapter 2

Persistent homology

The main objective of this chapter is to explain how we can encode multiscale topological properties of a nested family of simplicial complexes by using the correspondent sequence of homology groups. The study of homology at different scales simultaneously is called persistent homology and it is done using persistence modules. This information can be summarized and visualized easily by introducing persistence diagrams or barcodes. Although the main works on persistent theory ( [START_REF] Edelsbrunner | Topological persistence and simplification[END_REF], [START_REF] Cohen-Steiner | Stability of persistence diagrams[END_REF], [START_REF] Zomorodian | Computing Persistent Homology[END_REF]) assume finiteness on the nested family of simplicial complexes, which is understandable from a computational point of view, that restriction can be lifted. One of the reasons why a contiuous approach is desirable is that, ideally, the persistent homology of a sample will be an approximation to the persistent homology of its continuous underlying structure. We will focus on this last approach by following [START_REF] Chazal | The Structure and Stability of Persistence Modules[END_REF].

Filtrations

Definition 2.1.1. A filtration of a topological space X is a nested family of subspaces (X r ) r∈T , where T ⊆ R, such that for any r, r ∈ T with r ≤ r , then X r ⊆ X r . Moreover, X = ∪ r∈T X r .

In particular, when X is a simplicial complex, the subspaces X r are considered to be subcomplexes. The usual filtrations are the following families.

1. When working with a data set X, families of Vietoris-Rips complexes (Rips r (X)) r∈R and Čech complexes ( Čech r (X)) r∈R . We assume Rips r (X) = Čech r (X) = ∅ for r < 0. The parameter r could be understood as the scale at which we consider the data.

2. In general, given a topological space X and a continuous map f : X → R, the family of sublevel sets X r = f -1 ((-∞, r]).

3. In the case of a simplicial complex K, with set of vertices V , the sublevel set filtration can be defined as follows. Let f : V → R be a map defined on the vertices and extend it to all simplexes of K by f ([p 0 , . . . , p n ]) = max{f (p i ) : i = 0, . . . , n}. Then, the family of subcomplexes given by the r-sublevel sets of f defines a filtration (K r ) r∈R , K r = {σ ∈ K : f (σ) ≤ r}.

Given a filtration, when the parameter r changes the homology of the subspaces X r changes too. For example, concerning the zero homology groups (which are directly related to the number of path connected components), while r changes new path connected components could appear or existing ones could disappear (e.g. when two of them merge into one). We could say that the life of a path connected component C begins when it appears in the filtration and ends when it merges with a previous one. If this happens at X r 1 and X r 2 respectively, we say that the life time of C is the interval [r 1 , r 2 ). As a result, the information about the zero homology groups of the filtration is encoded as a set of intervals. This is called a persistent barcode. Moreover, these intervals can be interpreted as points in R 2 obtaining a multiset1 called persistence diagram. Obviously, this could be made for higher dimensional homology groups, tracking the changes of cycles and boundaries.

This idea of persistence barcodes and diagrams can be formally and rigorously defined in an algebraic framework using persistence modules.

Persistence modules

Let (T, ≤) be any poset and k a field. Definition 2.2.1. A persistence module V over T is functor from T , considered a category in the usual way, to the category of vector spaces. Thus, it consists of an indexed family of k-vector spaces (V t ) t∈T and a doublyindexed family of linear maps (v s t :

V s → V t ) s≤t that satisfy v s t • v l s = v l t , whenever l ≤ s ≤ t, and v t t = id Vt . V l V t V s v l t v l s v s t In general, T ⊆ R. When T is finite {t 0 < t 1 < • • • < t n } the persistence module can be expressed as the sequence V t 0 → V t 1 → • • • → V tn .
Note that, given any filtration of a topological space X, a persistence module can be obtained by applying to it any functor from the category of topological spaces to the category of vector spaces. In particular, H n (•, k) for k a field and any n ∈ N, obtaining a persistence module of homology groups. Definition 2.2.2. Consider a filtration (X t ) t∈T of a topological space X. Fix n ∈ N. For any s < t, the (s,t)-persistent homology group of X is

H s→t n (X) = im(H n (X s , k) → H n (X t , k)) = Z n (X s , k) Z n (X s , k) ∩ B n (X t , k) .
Its dimension is called persistence Betti number β s t := dim H s→t n (X).

A homology class in H n (X t ) is said to persist if its image in H n (X t+1 ) is also nonzero; otherwise it is said to die. A homology class in H n (X t ) is said to be born when it is not in the image of H n (X t-1 ). Hence, β s t can be interpreted as the number of independent homology classes of H n (X t ) born before H n (X s ).

Remark 2.2.3. It can happen that, given a persistence module (V t ) t∈T , the vector spaces change only for some finite values of t, and they stay the same between these values. That is, if these values are t 1 < t 2 < • • • < t n , which are called critical values, then

V t = V t 1 , t ≤ t 1 , V t = V t i , t i-1 < t ≤ t i for i ∈ {2, . . . , n}, V t = V tn , t ≥ t n .
Then, all the information is contained in the finite sequence ) be a finite set of points and consider the filtration given by the Čech complexes ( Čech α (X)) α∈R + . For each n ∈ N their n-th homology groups define a persistence module (H n ( Čech α (X))) α∈R + , where the linear maps are induced by the inclusions. Consider also the filtration (X α ) α∈R + for X α = x∈X B(x, α). Likewise, the n-th homology groups and the induced homomorphisms from the inclusions define a persistence module (H n (X α )) α∈R + . Then, the persistent nerve theorem 1.2.2 gives an isomorphism between them. ♦

V t 1 → V t 2 → • • • → V tn . ♦ Definition
In order to define persistence diagrams, and to measure the life time of the appearing features, we need to introduce a special kind of persistence modules called interval modules. Definition 2.2.7. An interval in a totally ordered set T is a subset J ⊆ T such that, if r ∈ J and t ∈ J with r < s < t, then s ∈ J too. Definition 2.2.8. Given an interval in a totally ordered set J ⊆ T , the interval module I over T , denoted by k J T or simply k J , is the persistence module defined by

I t = k t ∈ J, 0
0 t 0 → • • • → 0 t i-1 → k t i → k t i+1 → • • • → k t j → 0 t j+1 → • • • → 0 tn .

♦

This type of persistence modules may be interpreted as the life time of a feature, which persists over the interval J and nowhere else. Consequently, if a persistence module could be decompose into interval modules, this decomposition would give us an idea of the life time of the different features of the module. These and the following results related to interval modules entitle them to be considered the building blocks of persistence. Definition 2.2.10. Given two persistence modules U and V over T , we can define the direct sum W = U ⊕ V (over T ) as W t = U t ⊕ V t and w s t = u s t ⊕ v s t . We say that W is idecomposable if the only decompositions are the trivial ones, i.e.

W = W ⊕ 0 = 0 ⊕ W.
This generalizes to arbitrary direct sums.

Proposition 2.2.11 ([4]). Let J ⊆ T be an interval and I = k J T an interval module over T . Then, 1. End(I) = k.

Interval modules are idecomposable.

Proof.

1. Let φ be an endomorphism of I. For each nonzero I t = k, i.e. t ∈ J, φ t ∈ End(k) so it acts on I t by scalar multiplication. Besides, it also satisfies φ t • i s t = i s t • φ s for all s ≤ t. If both s, t ∈ J then i s t = id k , which implies that it is the same scalar for each t ∈ J. All in all, End(I) = k.

2. Suppose that I decomposes as U ⊕ V. Consider the projections U ⊕ V → U ⊕ V onto U and V. It is clear that they are idempotent2 endomorphisms of U⊕V = I. However, we have just proved that End(I) = k, where the only idempotent elements are zero and the identity. We conclude that I can only decompose as I ⊕ 0 or 0 ⊕ I, so it is idecomposable.

Given an indexed family of intervals (J l ) l∈L we can define the persistence module

V = l∈L k J l , (2.2)
which can be thought as having an independent feature for each l ∈ L that persist over the interval J l . We could say then that each feature appears in the filtration at time inf(J l ) and disappears at time sup(J l ). That is why the left endpoint is also called birth time, while the right endpoint is called death time.Therefore, the next step is to study which persistence modules can be decompose as (2.2). Hereinafter all persistence modules will be considered over subsets of the real numbers R.

Theorem 2.2.12 ( [START_REF] Chazal | The Structure and Stability of Persistence Modules[END_REF]). Let V be a persistence module over T ⊆ R. It can be decomposed as a direct sum of interval modules if one of the following is satisfied:

1. T is a finite set, 2. each V t is finite-dimensional.
In that case, we say that V is decomposable.

Proof. We are going to sketch the proof for the case of persistence modules of finite type over N. That is, V where each V i is finite dimensional and there exists N ∈ N such that, for all i ≥ N , v i i+1 are isomorphisms. It can be found in [START_REF] Zomorodian | Computing Persistent Homology[END_REF]. The extension to infinite-dimensional modules follows from [START_REF] Auslander | Representation theory of Artin algebras[END_REF]. On the other hand, the general proof of the second statement is fully developed in [START_REF] Crawley-Boevey | Decomposition of pointwise finite-dimensional persistence modules[END_REF].

Let V be a persitence module of finite type over N. Equip k[t] with the standard grading. A graded module M over a graded ring R is a module such that M i M i , i ∈ Z, and the action of R on M is defined by R n ⊗ M m → M n+m . We say that M is non-negatively graded if M i = 0 for all i < 0. Then, we can associate to V the following graded module over k

[t], α(V) = ∞ i=0 V i ,
where the k-module structure is simply the sum of the structures on the individual components and the action of k[t] is given by t • (u 0 , u 1 , . . .) = (0, v 0 1 (u 0 ), v 1 2 (u 1 ), . . .).

That is, it shifts elements up in the gradation thanks to the linear maps v i i+1 . By Artin-Rees theory in commutative algebra, the correspondence α defines an equivalence of categories between the category of persistence modules of finite type over k and the category of finitely generated non-negatively graded modules over k[t]. Since k is a field, k[t] is a PID and we can apply the structure theorem of graded modules over graded PID. This theorem states that, given M a graded module over D a PID, it decomposes uniquely as

n i=1 Σ β i D ⊕ m j=1 Σ γ j D/d j D ,
where d j ∈ D are homogeneous elements so that d j |d j+1 ; β i , γ j ∈ Z and Σ β denotes a β-shift upward in the grading. In our case, the only graded ideals of k[t] are homogeneous of the form (t i ) = t i • k[t], i ≥ 0, so we can conclude that α(V) decomposes as

n i=1 t β i k[t] ⊕ m j=1 t γ j k[t]/(t n j ) .
Finally, notice that, for interval modules, α(k[i, ∞)) decomposes in the form t i k[t], while α(k[i, j)) does as t i k[t]/(t j-i ).

Remark 2.2.13. The first part of the proof, up to the application of the structure theorem, is still true if we consider persistence modules V where each V i is an Rmodule (R a commutative ring). Then, α(V) is a graded module over R[t]. However, R[t] is not a PID, so we cannot apply the structure theorem and the classification of R[t] graded modules is not simple. ♦ Lastly, we state and important property of decomposable modules: the multiset of intervals (J l ) l∈L is an invariant of V, it does not depend on the decomposition chosen. It is deduced from the Krull-Remak-Schmidt-Azumaya theorem, that we introduce first. Theorem 2.2.14 (Krull-Remak-Schmidt-Azumaya Theorem [START_REF] Azumaya | Corrections and supplementaries to my paper concerning Krull-Remak-Schmidt's theorem[END_REF]). Let M be a module and suppose it is decomposable into a direct sum of idecomposable submoduli M λ ,

M λ∈Λ M λ .
In addition, suppose that the sum of any two non-automorphisms of M λ is also a nonautomorphism. Then, given a second direct decomposition of M into idecomposable submodules

M δ∈∆ N δ ,
there exists a one-to-one mapping σ

: Λ λ → σ(λ) ∈ ∆ such that M λ is isomorphic to N σ(λ) for each λ ∈ Λ.
Theorem 2.2. 15 ([4]). Let V be a persistence module over T ⊆ R which can be expressed as a direct sum of interval modules in two different ways

m∈N k Kn V l∈L k J l .
Then, there is a bijection σ : L → N such that J l = K σ(l) for all l ∈ L.

Proof. Notice that in our case V is decomposed as a direct sum of interval modules.

We have seen that End(I) = k. Since the only non-isomorphism is the zero map, the condition on the non-automorphisms of Krull-Remak-Schmidt-Azumaya theorem is satisfied for both decompositions. We conclude that there exists a bijection σ :

L → N , l → σ(l), such that k J l is isomorphic to k K σ(l)
. Nevertheless, it is clear that if two interval modules are isomorphic k J k K , then J = K. All in all, σ : L → N is a bijection such that J l = K σ(l) for each l ∈ L.

Persistence barcodes and diagrams

Let V be a decomposable persistence module over T ⊆ R. As we have already pointed in remark 2.2.9, when the module is defined over a finite set T , the intervals can be written as closed intervals. However, in the general case, we have to distinguish between closed, open or half-open intervals. In order to keep a clear exposition we introduce the following notation

(b -, d -) := [b, d), (b -, d + ) := [b, d], (b + , d -) := (b, d), (b + , d + ) := (b, d], (2.3)
where b, d ∈ R and b + , d -could be infinite. These real numbers with a superscript are called decorated reals and they form a totally order set by establishing Thanks to the invariance of the multiset of intervals, given by theorem 2.2.14, the following notions are well-defined. Definition 2.2.16. The persistence barcode of a decomposable module V is the collection of intervals of the decomposition.

b -< b < b + < d -< d < d + , (2.4
Since the order of the intervals does not matter, one typically orders them in terms of the left endpoint (birth time) in increasing order. Definition 2.2.17. The decorated persistence diagram is the multiset

Dgm(V) = Int(V) = {(b * l , d * l ) : l ∈ L},
while the undecorated persistence diagram is defined to be the multiset

dgm(V) = int(V) = {(b l , d l ) : l ∈ L} -∆,
where ∆ = {(r, r) : r ∈ R}.

Remark 2.2.18. Isomorphic decomposable persistence modules have the same persistence diagrams. ♦

Observe that the persistence homology module obtained from filtrations of finite simplicial complexes satisfies the hypothesis of theorem 2.2.12. Hence, persistence barcodes and diagrams of such filtrations are always well-defined. The later are denoted by Dgm n and dgm n when they correspond to the n-th homology groups. Notice that distinct choices of the field k can lead to different persistence diagrams and barcodes.

Example 2.2.19. Let X ⊂ (R m , || • || q ) be a finite set of points and consider the persistence modules (H n ( Čech α (X))) α∈R + and (H n (X α )) α∈R + , where X α is the union of balls of radius α centered on the points of X. Then, they have the same persistence barcode and diagram. ♦

When finite, persistence barcodes and diagrams can be represented in the plane. For persistence barcodes, intervals J are ploted as {(r 1 , r 2 ) ∈ R 2 : r 1 ∈ J} for some fix r 2 ∈ R. If we are studying the persistence modules obtained from homology, one represents the zero homology barcode first, followed by the first homology barcode and so on. An example is shown in figure 2.2. In the case of presistence diagrams (figure 2.3), the intervals are represented as a multiset of points in the extended upper half-plane

R2 ≥ = {(r 1 , r 2 ) ∈ R 2 : r 2 ≥ r 1 } ∪ {-∞} × R ∪ R × {+∞} ∪ {(-∞, +∞)}.
For decorated persistence diagrams ticks pointing into the quadrant suggested by the superscripts are added, as it is shown in figure 2.1 and 2.4.

(b + , d -) (b + , d + ) (b -, d -) (b -, d + ) Figure 2
.1: Decorated points of the plane and the associated ticks.

Example 2.2.20 ([4]

). Consider a loop X in the plane, represented in figure 2.4, and the continuous map g : X → R given by the projection onto the y-coordinate.

Consider the sublevel set filtration X r = g -1 ((-∞, r]). For each n ≥ 0 this defines a persistence module V n given by V n r = H n (X r , k) and v s r = H n (i s r ), where i s r : X s → X r is the inclusion. Let us see how they decompose into interval modules.

• For n = 0, the zero homology group is related to the path connected components of the topological space. In this case,

H 0 (X r , k)                    0 r ∈ (-∞, a), k r ∈ [a, b), k 2 r ∈ [b, c), k r ∈ [c, d), k 2 r ∈ [d, e), k r ∈ [e, ∞).
Notice that there are five critical values of r at which the vector spaces change. Therefore, it is enough to consider the 5-term persistence modules obtained by restricting V 0 to those five values

0 → k v a b -→ k 2 v b c -→ k v c d -→ k 2 v d e -→ k.
In order to decompose the persistence module, we need to specify the homomorphisms of the above sequence. Let p a be a The red intervals correspond to the zero homology, while the blue ones correspond to the first homology. The x-coordinate indicates the length of the interval.

H 0 (X c , k). The same happens when r = e, and in this case

[p a ] = [p b ] = [p d ].
Hence, the homomorphisms between vector spaces can be expressed as follows

0 → k[p a ] → k[p a ] ⊕ k[p b ] → k[p a ] → k[p a ] ⊕ k[p d ] → k[p a ] [p a ] → ([p a ], 0) → [p a ] → ([p a ], 0) → [p a ] (0, [p b ]) → [p a ] (0, [p d ]) → [p a ].
We can rewrite this so that the persistence module is the direct sum of interval modules, where remember that the maps between vector spaces could only be direct sums of the identity and zero map, All in all, we have three persistence intervals

0 → k[p a ] → k[p a ] ⊕ k([p b ] -[p a ]) → k[p a ] → k[p a ] ⊕ k([p d ] -[p a ]) → k[p a ] [p a ] → ([p a ], 0) → [p a ] → ([p a ], 0) → [p a ] (0, [p b ] -[p a ]) → 0 (0, [p d ] -[p a ]) →
k[a, +∞) :0 → k[p a ] → k[p a ] → k[p a ] → k[p a ] → k[p a ], k[b, c) :0 → 0 → k([p b ] -[p a ]) → 0 → 0 → 0, k[d, e) :0 → 0 → 0 → 0 → k([p d ] -[p a ]) → 0, and V 0 k[a, +∞) ⊕ k[b, c) ⊕ k[d, e).
• For n = 1, the homology groups are

H 1 (X r , k) 0 r ∈ (-∞, f ), k r ∈ [f, ∞).
Therefore, in this case we already have a persistence interval, since all vector spaces are zero for r < f and equal to k when r ≥ f , with the identity as connecting homomorphism. Consequently,

V 1 k[f, ∞).
• For n ≥ 2 all homology groups are zero.

The decorated persistence diagram can be found in figure 2. [START_REF] Chazal | The Structure and Stability of Persistence Modules[END_REF]. Let us see what information can be obtained about X from it. For the zero homology group, figure 2.4 shows that it decomposes into three interval modules. One of them persists and the other two are born and die later, the last one at r = e. This implies that H 0 (X r , k) k for r > e. Meanwhile, the first homology group only has one interval, which begins at f and persists. Therefore, H 1 (X r , k) k for r > f . Any higher homology group is zero. Hence, X is path connected and there is a loop. ♦

Recall that each interval of a decomposition may be interpreted as the time that certain feature persists in the filtration. In this situation, long bars in a barcode, or points away from the diagonal in a the persistence diagram, represent topological features that persist through a large range of indexes, generally considered as being more significant. Meanwhile, short bars or points close to the diagonal are topological properties that appear and disappear almost instantly. This gives us an idea of the importance of a barcode or a persistence diagram representation, due to its capability to capture significant features. In fact, we can establish a connection between the ranks of the homomorphisms of a decomposable persistence module and the barcode/diagram representation.

Assume that V is a persistence module, with finite dimensional vector spaces V t , which is decomposable

V l∈L k(b * l , d * l ) = W.
Since V and W are isomorphic, the rank of v s t : V s → V t for s ≤ t is equal to the rank of w s t : W s → W t . Recall that the latter are defined as direct sums of identity and zero maps. Therefore, rk(w s t ) is the number of summands k of W s that persist until W t , i.e. that are not sent to zero. Notice that a summand satisfies this if and only if it belongs to an interval module k J such that [s, t] ⊂ J. Therefore, rk(w s t ) is equal to the number of interval modules k J such that J contains [s, t]. In a persistence barcode representation this corresponds to the number of intervals that contain [s, t]. For a decorated persistence diagram this is equal to the number of points, counted with multiplicity, that belongs, together with their ticks

, to R = [-∞, s] × [t, ∞]. Indeed, an interval J ⊂ R is represented by a point and a tick in R if and only if J = [s, t]; J = (b, t] or [b, t], with b < s; J = [s, d) or [s, d], with d > t; or any possible interval with endpoints b < s ≤ t < d. It is clear that an interval J contains [s, t] if and only if it is one of the above.
When working with homology persistence modules,

β s t = dim(H s→t n (X)) is the rank of v s t .
As a consequence, the persistence Betti number β s t is equal to the number of intervals in the barcode containing [s, t] or, equivalently, to the cardinality of

Dgm n ∩ ([-∞, s] × [t, ∞]) counted with multiplicity.
Remark 2.2.21. This relation between ranks and cardinality of the persistence diagram restricted to a rectangle can be generalized, as we will see when studying q-tame persistence modules in chapter 3 (see (3.9)). ♦

Going back to theorem 1.3.12, the homology of M η can be recovered from the interval decomposition, the persistence barcode or the persistence diagram of the Rips complex filtration, since

β n (M η ) = rk(j * ) = dim(H r→4r n (Rips(X))) = β r 4r .
To sum up, we have managed to transform a set of complex observations into a collection of persistence diagrams (that are basically multisets in the extended upper half-plane), which are easier to handle and might be used to produce statistical analysis. In the next chapter we will extend the definition of persistence diagrams to persistence modules that are not necessarily decomposable into intervals.

Chapter 3 Q-tame persistence modules

It is possible to define persistence diagrams from the point of view of measure theory. In this framework, a persistence module over T ⊂ R defines an integervalued measure on rectangles of R 2 , called persistence measure. When the measure is finite it is concentrated at a discrete set of points. These points, taken with their multiplicities, constitute the persistence diagram. It will be seen that this let us define persistence diagrams for certain persistence modules without assuming an interval decomposition, as it is the case of q-tame modules. For decomposable modules both definitions agree (theorem 3.1.4). The theory developed in this chapter can be found in chapter 3 of [START_REF] Chazal | The Structure and Stability of Persistence Modules[END_REF].

Persitence measures

This section is dedicated to introduce the principal aspects of this measure theory framework, before moving to q-tame modules. But first of all, some notation.

Persistence modules indexed over finite sets {t 0 < t 1 < • • • < t n } are going to be understood as representations of quivers, due to their simplicity and clarity. Set theoretically, a quiver is a multigraph. A representation of a quiver consists in assigning a vector space to each vertex and a linear map to each edge. Therefore, the persistence module

V t 0 → V t 1 → • • • → V tn is a representation of the quiver • → • → • • • → •.
By theorem 2.2.12 (1.), these persistence modules decompose as a finite sum of interval modules. So as to visualize the interval decomposition in the quiver diagram, we add the indexes t ∈ T to the circles and we agree to use empty circles when the vector space associated is the zero one. Therefore, a map between two filled circles is always the identity; whereas all other maps are necessarily zero. We then write justinstead of arrows. For instance,

k[t 0 , t 2 ] = • t 0 -• t 1 -• t 2 , k[t 0 , t 1 ] = • t 0 -• t 1 -• t 2 . Definition 3.1.1. The measure µ V associated to a persistence module V is a func- tion defined on rectangles R = [a, b] × [c, d] ⊂ R 2 , with a < b ≤ c < d, and given by µ V (R) = • a -• b -• c -• d |V , where • a -• b -• c -• d
|V is defined as the number of copies of k[b, c] to occur in the decomposition of the finite indexed persistence module

V a → V b → V c → V d .
Notice that, since we are considering a finite subset of indices, the interval decomposition exists and the above is well-defined. In general, for a finite index set

T = {t 0 < • • • < t n }, the restricted persistence module V t 0 → • • • → V tn is denoted by V T .
The number of copies of an arbitrary interval summand I in the decomposition of V T is written as I|V T .

Obviously, two isomorphic persistence modules have the same associated measure.

Remark 3.1.2. 1. Consider the linear map v a b : V a → V b . Then, the following is satisfied rank(v a b ) = • a -• b |V , nullity(v a b ) = • a -• b |V , conullity(v a b ) = • a -• b |V .
In fact, using Zorn's lemma when needed, choose a basis B 1 of ker(v a b ) and P 2 a basis of im(v a b ). Let B 2 consist of preimages of the elements of P 2 (choose one preimage per element). Then, B 1 ∪ B 2 is a basis of V a and we can complete P 2 to a basis of V b , P 2 ∪P 3 . For each e 1 ∈ B 1 , e 2 ∈ B 2 (which is sent to l 2 ∈ P 2 by v a b ) and l 3 ∈ P 3 we have that (span(e 1 ) → 0), (span(e 2 ) → span(l 2 )), (0 → span(l 3 )), are respectively isomorphic to • a -• b , • a -• b and • a -• b , which are the only three tipes of interval modules over {a, b}. This proves the assertion since, for instance, for the first one it implies that the cardinality of B 1 is equal to the number of copies of

• a -• b that occur in the decomposition of V a → V b . 2. Let a < b ≤ c < d such that r b c := rk(v b c ) < ∞. Then, µ V (R) = • a -• b -• c -• d |V = r b c -r a c -r b d + r a d .
In order to prove this let us see first that, for any finite index sets S ⊂ T it is true that

I|V S = J J|V T , (3.1)
where the sum is over those intervals J ⊆ T such that they restrict over S to I.

In fact, any interval decomposition of V T induces and interval decomposition of V S . Then, in the latter, an interval summand is of certain type I if and only if it comes from a summand J of V T which restricts over S to I. Therefore, the number of copies of I in V S is equal to the sum, over those J, of the number of copies of J in V T , proving (3.1). In the current case, T = {a, b, c, d} and it follows that

r b c = [b, c]|V {b,c} = [a, c]|V T + [a, d]|V T + [b, c]|V T + [b, d]|V T , r a c = [a, c]|V {a,c} = [a, c]|V T + [a, d]|V T , r b d = [b, d]|V {b,d} = [b, d]|V T + [a, d]|V T , r a d = [a, d]|V {a,d} = [a, d]|V T .
Being r b c < ∞ implies that the other three ranks are finite too. We can then compute

r b c -r a c -r b d + r a d . On the right hand side all terms except [b, c]|V T = • a -• b -• c -• d |V cancel. ♦
The function µ V is called a measure because it is additive with respect to splitting a rectangle into two rectangles, i.e. This is easy to prove using (3.1). We do it in quivers notation.

µ V ([a, c] × [d, f ]) = µ V ([a, b] × [d, f ]) + µ V ([b, c] × [d, f ]), µ V ([a, c] × [d, f ]) = µ V ([a, c] × [d, e]) + µ V ([a, c] × [e, f ]), (3.2)
whenever a < b < c ≤ d < e < f .

R S T U V

µ V ([a, c] × [d, f ]) = • a --• c -• d -• f |V = • a -• b -• c -• d -• f |V + • a -• b -• c -• d -• f |V = • a -• b --• d -• f -|V + -• b -• c -• d -• f |V = µ V ([a, b] × [d, f ]) + µ V ([b, c] × [d, f ]), µ V ([a, c] × [d, f ]) = • a -• c -• d --• f |V = • a -• c -• d -• e -• f |V + • a -• c -• d -• e -• f |V = • a -• c -• d -• e -|V + • a -• c --• e -• f |V = µ V ([a, c] × [d, e]) + µ V ([a, c] × [e, f ]).
As a consequence, µ V satisfies the following properties.

Lemma 3.1.3 ([4]). Consider rectangles R 0 , . . . , R k all of them of the form [a i , b i ] × [c i , d i ] with a i < b i ≤ c i < d i : 1. Finitely additive: if R 0 can be written as a union R 0 = R 1 ∪ • • • ∪ R k of rectangles with disjoint interiors, then µ V (R 0 ) = µ V (R 1 ) + • • • + µ V (R k ). 2. Monotone: if R 0 ⊆ R 1 then µ V (R 0 ) ≤ µ V (R 1 ). 3. Subadditivity: if R 0 ⊆ R 1 ∪ • • • ∪ R k , then µ V (R 0 ) ≤ µ V (R 1 ) + • • • + µ V (R k ).
Proof.

1. By induction and (3.2) the proof is immediate for product decompositions. Then, it suffices to consider a product decomposition of R by which each R i is itself product-decomposed.

2. It is possible to decompose R 1 into finite rectangles with disjoint interiors such that R 0 is one of them. Then the result follows by finite aditivity and the fact that µ V ≥ 0.

3. Let us denote by α 1 < α 2 < • • • < α m all the x-coordinates of the corners of the rectangles. Do the same with

β 1 < β 2 < • • • < β n and the y-coordinates. It is clear that all pieces [α l , α l+1 ] × [β t , β t+1
] have disjoint interiors and that each R i is a union of some of those pieces. By finite aditivity, the measure of R i is the sum of the measure of the pieces.

As R 0 is contained in R 1 ∪ • • • ∪ R k ,
each of its pieces must belong, at least, to one of the R j , for j = 1, . . . , k.

Hence, µ V (R 0 ) ≤ µ V (R 1 ) + • • • + µ V (R k ).
The next theorem links the measure µ V to the decorated persistence diagram defined for decomposable persistence modules.

Theorem 3.1.4 ([4]). Suppose V is a decomposable persistence module over R V = l∈L k(b * l , d * l ). Then µ V (R) = card(Dgm(V)| R ) (3.3) for every rectangle R = [a, b] × [c, d] ⊂ R 2 with a < b ≤ c < d.
Remark 3.1.5. Seeing that points of Dgm(V) are decorated points, the restriction of this set to R consists of (b

* l , d * l ) ∈ Dgm(V) ∩ R. In general, given a rectangle R = [a, b] × [c, d] with a < b and c < d, we say that (b * l , d * l ) ∈ R if and only if a < b * l < b & c < d * l < d,
in the total order of (2.4). By studying the different cases of (2.3) it is easy to see that this is equivalent to the point with tick (b * l , d * l ) lying in the closed rectangle R, as figure 3.2 shows. ♦

µ V (R) = [b, c]|V {a,b,c,d} = l∈L [b, c]|k(b * l , d * l ) {a,b,c,d} .
On the other hand, since

k(b * l , d * l ) {a,b,c,d} is an interval module or zero, the number [b, c]|k(b * l , d * l ) {a,b,c,d} is 0 or 1. Moreover, it is 1 if and only if k(b * l , d * l ) {a,b,c,d} = • a -• b -• c -• d , that is, a < b * l < b and c < d * l < d, or equivalently (b * l , d * l ) ∈ R by remark 3.1.5. All in all, µ V (R) is equal to the number of decorated points (b * l , d * l ) ∈ Dgm(V) that also belong to R.
Given V decomposable such that r b c is finite, equality (3.3) and remark 3.

1.2 lead to card(Dgm(V)| R ) = r b c -r b d -r a c + r a d .
In the case of persistent homology these ranks are the persistence Betti numbers. Thus, if the corresponding persistence module is decomposable and

β b c is finite, we have that card(Dgm(V)| R ) = (β b c -β b d ) -(β a c -β a d ). (3.4)
This can be interpreted as the number of independent homology classes born between H n (X a ) and H n (X b ) that die between H n (X c ) and H n (X d ).

Theorem 3.1.4 gives us an idea of how to define the persistence diagram when we do not have a decomposition into interval modules. Once the measure µ V associated to the persistence module is known, we look for a multiset A ⊂ R 2 which satisfies (3.3) for all rectangles. In order to have a well-defined notion, we need to prove that such a multiset exists and is unique. Once this is done, the above corollary shows that both, this new definition and the old one, agree in the case of decomposable persistence modules.

Until now, we have restricted ourselves to finite rectangles. Nevertheless, we have seen that, even in the case of decomposable persistence modules, persistence diagrams can have points at infinity. Therefore, we should extend the measure µ V and give a definition for infinite rectangles. Definition 3.1.6. Let V be a persistence module and

-∞ ≤ a < b ≤ c < d ≤ +∞. Then, µ V ([a, b] × [c, d]) = • a -• b -• c -• d |V , where V -∞ = 0 = V +∞ .
This extended version of µ V satisfies the same properties as before: additivity, monotonicity and subadditivity. There is also an analogue of remark 3.1.2, ). Given a decomposable persistence module V, the measure µ V (R) of any rectangle R in the extended half-plane R2 ≥ is equal to the number of interval summands corresponding to decorated points (b * l , d * l ) which lie in R.

µ V ([-∞, b] × [c, +∞]) = r b c , µ V ([a, b] × [c, +∞]) = r b c -r a c , (if r a c < ∞) µ V ([-∞, b] × [c, d]) = r b c -r b d (if r b c < ∞).
Proof. Straightforward extension of the proof of theorem 3.1.4.

Rectangle measures

In this section we will introduce the notion of diagram of a given measure, in particular a rectangle measure. The measures µ V are just a particular case on the extended half-plane. For simplicity, we start working in R 2 . Later, we will expand the theory to the extended plane R2 . Seeing that the proof of lemma 3.1.3 only uses vertical and horizontal additivity, it is also true for rectangle measures. Hence, they are finite additive, monotonous and subadditive.

Definition 3.2.3. The r-interior of a region S ⊆ R 2 is S × = {(b * , d * ) : ∃R ∈ Rect(S) such that (b * , d * ) ∈ R}. In particular, R × = {(b * , d * ) : (b * , d * ) ∈ R} for any rectangle R ⊂ R 2 .
The interior in the classical sense may be defined as

S • = {(b, d) : ∃R ∈ Rect(S) such that (b, d) ∈ R • },
where R • is the usual interior.

The relation between rectangle measures and multisets of R 2 is stated by the following equivalence theorem. Theorem 3.2.4 (Equivalence Theorem [START_REF] Chazal | The Structure and Stability of Persistence Modules[END_REF]). Let S ⊆ R 2 . There is a bijective correspondence between:

1. Finite r-measures µ on S, i.e. µ(R) < ∞ for every R ∈ Rect(S).

Locally finite multisets

A in S × , i.e. card(A| R ) < ∞ for every R ∈ Rect(S).
Any pair (µ, A) given by this correspondence satifies for all R ∈ Rect(S) the equality

µ(R) = card(A| R ), (3.6)
Equivalently,

µ(R) = (b * ,d * )∈R n (b * ,d * ) ,
where n : S × → {0, 1, 2, . . .} is the multiplicity function for A. Therefore, the measure can be expressed as

µ = x∈A n x δ x , (3.7)
where δ x denotes the Dirac mass located at {x}.

Proof. Let A be a locally finite multiset in S × and define the function µ : Rect(S) → {0, 1, . . .}∪{∞} as µ(R) = card(A| R ). Since A is locally finite, µ is finite. In order to conclude that it is a rectangle measure, it suffices to prove additivity under splitting. Hence, consider R ∈ Rect(S) and split it vertically (horizontally) into two rectangles R 1 , R 2 . Note that every decorated point (b * , d * ) ∈ R belongs to exactly one of the R i . Consequently,

µ(R) = card(A| R ) = card(A| R 1 ) + card(A| R 2 ) = µ(R 1 ) + µ(R 2 ).
For the reverse implication we refer to theorem 3.12 of [START_REF] Chazal | The Structure and Stability of Persistence Modules[END_REF].

Thanks to this theorem we can finally define diagrams in the case of finite rmeasures in R 2 . These notions can be generalized for non-finite rectangle measures and regions S ⊆ R2 in the extended plane. In this case, rectangles are of the form R

= [a, b] × [c, d] ⊂ R2 , with -∞ ≤ a < b ≤ ∞ and -∞ ≤ c < d ≤ ∞.
The r-interior of R is defined analogously, whereas the interior R • is the relative interior of the rectangle as a subspace of the extended plane. This is done so as to not lose the points at infinity when we pass from a decorated diagram to its undecorated counterpart. A rectangle measure on a subset S of R2 is defined likewise. The same happens with the r-interior and interior of S. It can be proven as before that these measures are finite additive, monotonous and subadditive.

Example 3.2.6. For any persistence module V, the measure µ V is an r-measure on R2

≥ . ♦

To obtain an analogue of theorem 3.2.4 these two notions are required.

Definition 3.2.7. The finite r-interior of a rectangle measure µ on S ⊂ R2 is

F × (µ) = {(b * , d * ) : ∃R ∈ Rect(S) such that (b * , d * ) ∈ R, µ(R) < ∞}.
The finite interior is defined as

F • (µ) = {(b, d) : ∃R ∈ Rect(S) such that (b, d) ∈ R • , µ(R) < ∞}.
Notice that, whether µ is finite, then

F × (µ) = S × and F • (µ) = S • .
The following lemma will be needed in order to prove the next theorem.

Lemma 3.2.8 ([4]

). Let µ be a rectangle measure on S ⊂ R2 and consider any R ∈ Rect(S). Then, R × ⊆ F × (µ) if and only if µ(R) < ∞.

Proof. Sufficiency is trivial. In order to prove necessity, let R ∈ Rect(S) such that R × ⊆ F × (µ). Consider (b, d) ∈ R. If it is an interior point, then the four decorations (b * , d * ) belong to R × , and hence to F × (µ) by hypothesis. The definition of the finite r-interior implies that, for each of those decorations, there is a rectangle in Rect(S) of finite measure that contains the decorated point. Then, the union of these four rectangles contains a neighborhood of (b, d). It is clear that we can take a rectangle S ⊂ R contained in these union with (b, d) in its relative interior, with respect to R. By subadditivity, S has finite measure. The same can be done for non-interior points. The only difference is that there will be only two or one decorations contained in R × , and then we will only need two or one rectangles of finite measure. As a consequence, for each (b, d) ∈ R we are able to find a rectangle S ⊂ R of finite measure containing the point (b, d) in its relative interior. The rectangle R is contained in the union of all these rectangles. However, it is compact, so we can reduce it to a finite union. Again, subadditivity implies R has finite measure. Theorem 3.2.9 ( [START_REF] Chazal | The Structure and Stability of Persistence Modules[END_REF]). Let µ be an r-measure on S ⊂ R2 . Then there is a uniquely defined locally finite multiset Dgm(µ) in F × (µ) such that

µ(R) = card(Dgm(µ)| R ), (3.8)
for every R ∈ Rect(S) with R × ⊆ F × (µ).

Proof. Firstly, consider the case S ⊂ R

(R) = µ(ϕ -1 (R))
for any R ∈ Rect(ϕ(S)), where ϕ -1 : [-π/2, π/2] 2 → R2 is the inverse of ϕ. This is well-defined since ϕ -1 (Rect(ϕ(S))) = Rect(S). Moreover, this last equality also implies that, for every R ∈ Rect(ϕ(S)), there exists R ∈ Rect(S) such that

ϕ -1 (R) = R . Therefore, ϕ#µ(R) = µ(R ) and ϕ#µ is a rectangle measure on ϕ(S) ⊆ [-π/2, π/2] 2 ⊂ R 2 .
Applying the first part of this proof to ϕ#µ, there is a unique locally finite multiset Dgm(ϕ#µ) in

F × (ϕ#µ) such that ϕ#µ(R) = card(Dgm(ϕ#µ)| R ), for all R ∈ Rect(ϕ(S)) with R × ⊆ F × (ϕ#µ). However, it is easy to see that ϕ -1 (F × (ϕ#µ)) = F × (µ) and card(A| R ) = card(ϕ -1 (A)| ϕ -1 (R)
). All this, together with the fact that ϕ is a homeomorphism onto [-π/2, π/2] 2 , implies that ϕ -1 (Dgm(ϕ#µ)) is a locally finite multiset in F × (µ) which satisfies the statement of the theorem. Moreover, it is unique.

We can finally present the wanted definitions. Definition 3.2.10. The decorated and undecorated diagrams for an r-measure on S ⊂ R2 are the ordered pairs

(Dgm(µ), F × (µ)), (dgm(µ), F • (µ)),
where Dgm(µ) is given by the previous theorem and dgm(µ) is

dgm(µ) = {(b, d) : (b * , d * ) ∈ Dgm(µ)} ∩ F • (µ).
It should be pointed out that all the important information of µ is encoded in the persistence diagram. Indeed, the measure of any rectangle R with R × ⊆ F × (µ) is recovered by counting decorated points of Dgm(µ), and any other rectangle has infinite measure, as lemma 3.2.8 shows.

Remark 3.2.11. All in all, undecorated persistence diagrams dgm(µ) of rectangle measures are locally finite multisets in F • (µ). If these multisets do not have points at infinity, they can be described by measures of the form ν = x∈dgm(µ) n x δ x supported on F • (µ) ∩ R 2 , where n x ∈ N is the multiplicity of the point x and δ x is the Dirac mass located at x ∈ R 2 (recall equality (3.7)). Note that ν is a Borel measure finite on compact sets of F • (µ) ∩ R 2 , i.e. a Radon measure. In fact, any compact set K of F • (µ) ∩ R 2 can be covered by finitely many open rectangles R • such that µ(R) < ∞, by definition of the finite interior and by compactness. Then, by lemma 3.2.8 and theorem 3.2.9, card(Dgm(µ)| R ) coincide with µ(R), which is finite. Therefore, so is the cardinality of dgm(µ) on each of those rectangles. As a result, ν(K) is finite. This measure theory viewpoint has huge benefits when studying the properties of the space of persistence diagrams and it will be used in section 4.2. ♦

Measure persistence diagrams for persistence modules

As already mentioned in example 3.2.6, the persistence measure µ V of any persistence module V is an r-measure on the extended half-plane R2 ≥ . Consequently, its decorated diagram Dgm(µ V ) is defined in the subset of R2

≥ over which µ V is finite, the finite r-interior. In general, it does not have to be the whole extended half-plane. Notice that dgm(µ V ) is contained in R2 > = {(r 1 , r 2 ) ∈ R2 : r 1 < r 2 }. Definition 3.3.1. Let V be a persistence module. Its measure persistence diagrams are the decorated and undecorated diagrams

Dgm(V) = (Dgm(µ V ), F × (µ V )), dgm(V) = (dgm(µ V ), F • (µ V )), Remark 3.3.2.
Since two isomorphic persistence modules define the same measure, their persistence diagrams coincide. ♦

The following relationship between the two definitions of persistence diagrams is then clear.

Proposition 3.3.3 ([4]

). If V is a decomposable persistence module, then Int(V) (the persistence diagram defined from the decomposition in 2.2.17) agrees with the measure persistence diagram Dgm(µ V ) where the latter is defined, that is, on F × (µ V ).

Proof. By corollary 3.1.7 we have that µ V (R) = card(Int(V)| R ) for all rectangles contained in the extended half-plane. On the other hand, by theorem 3.2.9 we also have µ V (R) = card(Dgm(µ V )| R ) for all rectangles with finite measure. Uniqueness implies that Int(V) and Dgm(µ V ) must be the same multiset when restricted to F × (µ V ). Remark 3.3.4. Neither definition strictly outperforms the other. There are decomposable persistence modules for which Dgm is not defined but Int is. For instance, if

V = l∈L k(b * l , d * l ) with (b l , d l ) forming a dense subset of R2 ≥ , Int(V) is defined but Dgm(µ V ) is not, since µ V (R)
is infinite for every rectangle. Moreover, there are persistence modules not decomposable for which Dgm is defined almost everywhere (see example 3.31 of [START_REF] Chazal | The Structure and Stability of Persistence Modules[END_REF]). ♦

Persistence diagrams for q-tame modules

An interesting type of persistence modules for which persistence diagrams are welldefined are the q-tame modules.

Definition 3.3.5. A persistence module V over T ⊂ R is q-tame if r s t := rk(v s t ) is finite, whenever s < t.

By remark 3.1.2 this implies that µ V (R) is finite for every R = [a, b] × [c, d] ⊂ R2 ≥ not touching the diagonal, i.e. a < b < c < d. That is, µ V is a finite r-measure on R2 > and F • (µ V ) = R2 > .
Therefore, the measure persistence diagram of a qtame module is well-defined as a locally finite multiset on R2

> , given by dgm(V). Nevertheless, Dgm(V) might have points in the diagonal (some rectangle touching the diagonal may have finite measure). For several reasons, which will become clear in the next chapter, we will not consider these points and therefore we will work with undecorated diagrams. Moreover, we will add to dgm(V) the diagonal with infinite multiplicity. This will allow us to define distances between persistence diagrams. Summarizing:

Theorem 3.3.6 ([1]
). If V is a q-tame persistence module, then it has a welldefined persistence diagram. Such a persistence diagram is the union of points in ∆ = {(r, r) : r ∈ R}, counted with infinite multiplicity, and a locally finite multiset

dgm(V) in R2 > . That is, for any rectangle R = [a, b] × [c, d]
with a < b < c < d, the number of points of dgm(V) contained in R, counted with multiplicity, is finite.

Last but not least, the case of simplicial complexes is recovered and some results concerning their persistence modules at the homology level are stated. Definition 3.3.7. A filtration (X t ) t∈T of topological spaces or simplicial complexes is tame if, for any integer n, the persistence module (H n (X t , k)) t∈T is q-tame. If this filtration consists of sublevel sets of some function f : X → R, we say that f is tame.

In these cases, due to (3.5) and as long as b < c, the following equivalence between persistence Betti numbers and measures of rectangles [START_REF] Chazal | The Structure and Stability of Persistence Modules[END_REF]). Let X be a compact polyhedron. That is, X is the realisation of a finite simplicial complex K as a topological space. Consider f : X → R a continuous function. Then, f is tame.

R = [-∞, b] × [c, ∞] is satisfied β b c = µ V (R) = card(Dgm(V)| R ). ( 3
Proof. Consider b < c. By successive barycenter subdivision, X can be represented as the realisation of a finite simplicial complex where no simplex meets both f -1 (b) and f -1 (c). Let Y be the union of the closed simpleces which meet

X b = f -1 (-∞, b].
Then, by construction, we have the inclusions X b ⊆ Y ⊆ X c . For any n ∈ N, this translates into the commutative diagram

H n (X b , k) H n (X c , k) H n (Y, k)
Since Y is the realisation of a finite simplicial complex, H n (Y, k) has finite dimension. Therefore, the rank of H n (X b , k) → H n (X c , k) is finite. This proves that the homology persistence module is q-tame.

Corollary 3.3.10 ( [START_REF] Chazal | The Structure and Stability of Persistence Modules[END_REF]). Let X be a locally compact polyhedron. That is, X is the realisation of a locally finite1 simplicial complex K. Consider f : X → R a proper continuous funtion which is bounded below. Then, f is tame.

Proof. Analogously to the previous proposition, we have to prove that, for any b < c, the rank of the homomorphism

H n (X b , k) → H n (X c , k) is finite. Notice that, if we find a compact subpolyhedron Y of X that contains X c (X b ⊆ X c
), then we finish by applying the preceding proposition in Y . By hypothesis, f is bounded below, so

X c = f -1 [min(f ), c];
and proper, so X c is compact. Therefore, any open cover of X c by open neighborhoods of its points, has a finite subcover. Since K is locally finite, those neighborhoods can be chosen such that they only intersect finitely many closed simplices. As a result, there are only finitely many closed simplices meeting X c . The union of them gives Y . This is the case of distance functions, whence the homology persistence modules obtained from offsets of compact sets are q-tame too.

Chapter 4 Metrics on the space of persistence diagrams

In previous chapters it has been shown that persistence diagrams are hugely helpful tools to encode and interpret topological information of filtrations. It is clear that, in order to study this information, it would be extremely useful to compare them. We will focus on q-tame modules, whose persistence diagrams are well-defined and which include relevant practical cases. All in all, the objective of this chapter is to endow the set of persistence diagrams with a metric structure, i.e. to give a distance between them. The main reference is [START_REF] Lacombe | Statistics for Topological Descriptors using optimal transport[END_REF].

Bottleneck and p-th distances

Throughout this section we will consider persistence diagrams associated to q-tame modules. Owing to theorem 3.3.6, they consist of a locally finite multiset, in the open extended half-plane R2

> , and the diagonal ∆ = {(r, r) : r ∈ R}, with infinite multiplicity. Therefore, in order to define a distance between them, we need to specify the distance between any pair of points in R2

> and between any point and the diagonal. The standard way of doing this is the bottleneck distance d ∞ , that we introduce below. This distance is related to the interleaving distance between two persistence modules U, V. The latter is defined as

d i (U, V) = inf{δ ≥ 0 : U, V are δ-interleaved}, (4.1)
where two modules are δ-interleaved if, for all t, there are linear maps φ t : U t → V t+δ and ψ t : V t → U t+δ such that the following diagrams commute for all s ≤ t

U s U t V s+δ V t+δ u s t φs φt v s+δ t+δ U s-δ U s+δ V s u s-δ s+δ φ s-δ ψs V s V t U s+δ U t+δ v s t ψs ψt u s+δ t+δ V s-δ V s+δ U s v s-δ s+δ ψ s-δ φs
In fact, the isometry theorem (theorem 5.14 of [START_REF] Chazal | The Structure and Stability of Persistence Modules[END_REF]) asserts that these two distances are equal for q-tame persistence modules and their undecorated persistence diagrams

d ∞ (dgm(U), dgm(V)) = d i (U, V). (4.2)
It should be pointed out that the interleaving distance is not a true metric, d i (V, U) does not imply V U (see example 5.2 of [START_REF] Chazal | The Structure and Stability of Persistence Modules[END_REF])

Let then dgm 1 and dgm 2 be two persistence diagrams with locally finite multisets X and Y in R2 > , respectively. Recall that, even though a multiset may have the same point repeated several times, all these repetitions are considered as different points of the set. Definition 4.1.1. A partial matching between dgm 1 and dgm 2 is a subset γ ⊆ (X ∪ ∆) × (Y ∪ ∆) such that any x ∈ X (y ∈ Y ) appears exactly once as a first (second) coordinate in γ.

Denote by Γ(dgm 1 , dgm 2 ) the set of all partial matchings between dgm 1 and dgm 2 . Notice it is nonempty, since we can always match all points to ∆. Remark 4.1.2. To define a distance between persistence diagrams based in pairing points, it is essential to add the diagonal with infinite multiplicity, as we did in theorem 3.3.6. In this way, if they have different number of off-diagonal points, we can find a match for the remaining ones, which could be countable. ♦ Definition 4.1.3. The bottleneck distance d ∞ between two persistence diagrams dgm 1 and dgm 2 is

d ∞ (dgm 1 , dgm 2 ) = inf γ∈Γ(dgm 1 ,dgm 2 ) max (x,y)∈γ ||x -y|| ∞ .
We can interpret max (x,y)∈γ ||x -y|| ∞ (the length of the longest edge in the matching) as the cost of γ, so that the bottleneck distance is defined as the minimal cost that can be achieved by matchings between both diagrams. A partial matching that realizes this infimum is said to be optimal. Indeed, there always exists an optimal matching. Theorem 4.1.4. Let X, Y be two locally finite multisets in the extended half-plane. Assume that, for every η > δ, there exists a partial matching between X and Y with cost less or equal than η. Then, there exists a partial matching with cost less or equal than δ.

Proof. For every integer n ≥ 1 let γ n be a matching with cost less or equal than δ + 1/n. Each of these matchings defines an indicator function χ n : X × Y → {0, 1}. The proof is based on constructing an indicator function χ : X × Y → {0, 1} which is the limit of the χ n . Then, check that this χ actually defines a matching with cost less or equal than δ. This is the matching we were looking for. The proof can be found in theorem 5.12 of [START_REF] Chazal | The Structure and Stability of Persistence Modules[END_REF]. Given a partial matching γ notice that, if (x, y) ∈ γ where x ∈ X has finite coordinates and y ∈ ∆, matching x with its orthogonal projection onto the diagonal instead would only reduce the cost. Hence, we can always assume y to be the orthogonal projection of x. Similarly, the points of the diagonal can always be matched to themselves with a null cost. Remark 4.1.6. The definition of bottleneck distance can also be applied to the decorated persistence diagram of a q-tame module, adding to it the diagonal with infinite multiplicity. However, in this case, the persistence diagram Dgm(V) may include diagonal points. Therefore, Dgm 1 and Dgm 2 with the same off-diagonal points, but with different diagonal ones, would satisfy d ∞ (Dgm 1 , Dgm 2 ) = 0, whereas Dgm 1 = Dgm 2 . By considering undecorated diagrams this problem is avoided. From a practical point of view it is also understandable to forget about boundary points, since they represent features that do not persist in the filtration. ♦ Furthermore, persistence diagrams may contain points of the form (b, +∞) or (-∞, d). The set of these points is called essential part of the diagram and they are compared in the expected way

||(-∞, d) -(-∞, q)|| ∞ = |d -q|, ||(b, +∞) -(p, +∞)|| ∞ = |b -p|, ||(-∞, +∞) -(-∞, +∞)|| ∞ = 0, ||(b, d) -(-∞, q)|| ∞ = ∞, ||(b, d) -(p, +∞)|| ∞ = ∞.
Hence, if the cardinalities of the essential parts of two persistent diagrams differ, the bottleneck distance would be infinite. That is, it would not define a true metric. To be finite we need

card(dgm 1 | {-∞}×R ) = card(dgm 2 | {-∞}×R ), card(dgm 1 | R×{+∞} ) = card(dgm 2 | R×{+∞} ), card(dgm 1 | {-∞}×{+∞} ) = card(dgm 2 | {-∞}×{+∞} ),
and that the points of the essential parts are matched with each other. It is easy to see that an optimal matching consists in sorting the points with respect to their finite coordinate and then using increasing matching. We can conclude that the essential parts behave independently of the rest of the diagram. Whence, in the following persistence diagrams with empty essential parts will be considered. This means that dgm will be contained in {(r 1 , r 2 ) ∈ R 2 : r 1 < r 2 }.

Remark 4.1.7. When computing persistence diagrams with numerical tools, filtrations need to be finite. As a consequence, it may happen that essential points are not such, and they disappear when larger filtrations are consider, or that they have not been studied yet, and will appear if we study a larger filtration. ♦

A distance between persistence diagrams is also useful to study how perturbations of the data set affect them. Obviously, these perturbations can change the filtration and, consequently, the persistence module and persistet homology, and they will be visible in the diagram. We would like that persistence diagrams are stable under some perturbations. That is, that two close data sets induce close diagrams in the bottleneck distance. Regarding this we have the two results below. Theorem 4.1.8 ( [START_REF] Chazal | An introduction to Topological Data Analysis: fundamental and practical aspects for data scientists[END_REF]). Let M be a topological space and f, g : M → R two real-valued functions. Suppose they are tame. Then, for any n ∈ N,

d ∞ (dgm n (f ), dgm n (g)) ≤ ||f -g|| ∞ = sup x∈M |f (x) -g(x)|,
where dgm n (f ) is the persistence diagram associated to the persistence module (H n (f -1 ((-∞, r]))) r∈R . In particular, the operator f → dgm n (f ) is 1-Lipschitz.

Proof. Denote δ = ||f -g|| ∞ . Then, for any r ∈ R, we have

F r = f -1 (-∞, r] ⊆ g -1 (-∞, r + δ] = G r+δ , G r = g -1 (-∞, r] ⊆ f -1 (-∞, r + δ] = F r+δ .
For every s ≤ t this yields to the following commutative diagrams, where all maps involved are inclusions

F s F t G s+δ G t+δ φs F s-δ F s+δ G s G s G t F s+δ F t+δ G s-δ G s+δ F s
It is clear then that the induced commutative diagrams between n-th homology groups imply that the corresponding persistence modules (H n (F r , k)) r∈R and (H n (G r , k)) r∈R are δ-interleaved. Moreover, by hypothesis, these modules are q-tame. Therefore, the isometry theorem of (4.2) provides the inequality

d ∞ (dgm n (f ), dgm n (g)) = d i (H n (F r , k), H n (G r , k)) ≤ δ = ||f -g|| ∞ .
If we consider simplicial complexes built on top of point clouds, the above statement transforms as follows.

d GH ((M 1 , d 1 ), (M 2 , d 2 )) = inf ϕ M 1 ,ϕ M 2 ,M d H (ϕ M 1 (M 1 ), ϕ M 2 (M 2 )),
where the infimum is taken over all isometric embeddings ϕ M 1 , ϕ M 2 of M 1 , M 2 into some same metric space (M, d). Indeed, this infimum is a minimum. When both compact spaces belong to the same metric space,

d GH = d H . Proof. Let δ = d GH ((X, d X ), (Y, d Y ))
. By definition, there is a metric space (M, d M ) and two isometric embeddings ϕ X : X → M and ϕ Y :

Y → M such that d H (ϕ X (X), ϕ Y (Y)) = d GH ((X, d X ), (Y, d Y )) = δ.
It is a standard result that any finite metric space of cardinality m can be isometrically embedded into (R m , l ∞ ), where l ∞ is the distance defined by the infinity norm. Since both X and Y are finite, so is the isometric embedding ϕ X (X) ∪ ϕ Y (Y) in M . Denote by m its cardinality. Then, there exists an isometric embedding ϕ : (ϕ

X (X) ∪ ϕ Y (Y), d M ) → (R m , l ∞ ). It is clear that it satisfies d H (ϕ • ϕ X (X), ϕ • ϕ Y (Y)) = d H (ϕ X (X), ϕ Y (Y)) = δ.
Recall that, by definition of Hausdorff distance 1.3.1, the left hand side is equal to ||l

∞ ϕ•ϕ X (X) -l ∞ ϕ•ϕ Y (Y) || ∞ , so ||l ∞ ϕ•ϕ X (X) -l ∞ ϕ•ϕ Y (Y) || ∞ = δ.
On the other hand, consider the filtration given by (l ∞ ϕ•ϕ X (X) ) -1 ((-∞, r)), which is just the union of open l ∞ -balls of radius r centered on points of ϕ•ϕ X (X). Note that these balls are convex sets. Therefore, we can apply the persistent nerve theorem as in examples 2.2.6 and 2.2.19. We conclude that this filtration defines a homology persistence module isomorphic to the one of the Čech filtration, Čech r (ϕ • ϕ X (X)). In particular, both filtrations are tame and have identical persistence diagrams. The same can be deduced for ϕ•ϕ Y (Y). Being tame filtrations implies that, using similar argument to those of the previous theorem, we can prove the following inequality

d ∞ (dgm(l ∞ ϕ•ϕ X (X) ), dgm(l ∞ ϕ•ϕ Y (Y) )) ≤ ||l ∞ ϕ•ϕ X (X) -l ∞ ϕ•ϕ Y (Y) || ∞ = δ.
Having the same persistence diagrams means that the diagrams of the Čech filtrations of ϕ • ϕ X (X) and ϕ • ϕ Y (Y) are also at bottleneck distance δ. As ϕ, ϕ X and ϕ Y are isometric embeddings, they preserve distances. Consequently, Čech r (ϕ • ϕ X (X), l ∞ ) = Čech r (X, d X ). The same equality is deduced for Y. All in all, the Čech filtrations of X and Y are at bottleneck distance δ, as wanted.

Lastly, by lemma 2.9 of [START_REF] Chazal | Gromov-hausdorff stable signatures for shapes using persistence[END_REF], Čech complexes of parameter r coincide with Rips complexes of parameter 2r in (R m , l ∞ ). Therefore, the filtration Čech r (ϕ • ϕ X (X)) is exactly the same as Rips 2r (ϕ • ϕ X (X)). Arguing as before, the latter coincide with Rips 2r (X, d X ). Consequently, the persistence diagrams of all these filtrations are the same. Proceeding analogously with Y we conclude that persistence diagrams of the Rips filtrations of X and Y are at bottleneck distance 2δ, as wanted.

As a consequence, similar point clouds have similar persistence diagrams. If we interpret persistence diagrams as multiscale topological features, it means that these features are robust with respect to perturbations of the data in the Gromov-Hausdorff metric. Indeed, the lower bound provided by theorem 4.1.9 can be used for classification tasks, as done in [START_REF] Chazal | Gromov-hausdorff stable signatures for shapes using persistence[END_REF].

Although the bottleneck distance is extremely useful when studying the stability properties of persistence diagrams, it only depends on the largest distance among pairs of the matching. Hence, the closeness of the remaining points is not taken into account. As a consequence, if γ is an optimal matching, any other matching that does not change the distance between the furthest pair is also optimal. In particular, optimal matchings are not unique in general. Likewise, a perturbation that leaves the length of the longest edge of the matching intact will not be detected by the bottleneck distance. This is not desirable, since discriminating information used in applications may lie in these undetected properties. All in all, a new distance must be introduced. Definition 4.1.11. The p-th distance, or Wasserstein distance, between two persistence diagrams dgm 1 and dgm 2 is defined as

d p (dgm 1 , dgm 2 ) =   inf γ∈Γ(dgm 1 ,dgm 2 ) (x,y)∈γ ||x -y|| p q   1 p
,

where 1 ≤ p < ∞.
The infimum is also attained in this case (propositions 4.3.9 and 4.3.10). Now, the cost of a partial matching involves all the edges of the matching, solving the previous problems. For simplicity we will denote both distances as d p for 1 ≤ p ≤ ∞.

There is also a weaker stability result for the p-th distance. Before the statement we need some definitions. Definition 4.1.12. Given a persistence diagram dgm, the total persistence of parameter p is

Pers p (dgm) = d p (dgm, 0) p , if 1 ≤ p ≤ ∞, Pers ∞ (dgm) = d ∞ (dgm, 0)
where 0 denotes the empty diagram (which consists only of the diagonal points with infinite multiplicity). Definition 4.1.13. Let M be a triangulable, compact metric space. It is said to imply a bounded degree-q total persistence, with 1 ≤ q < ∞, if there exists a constant C M such that Pers q (dgm n (f )) ≤ C M Lip(f ) q , for every tame Lipschitz function f : M → R.

Example 4. 1.14 ([23]). S n implies bounded degree-q total persistence for q = n + δ, for any δ > 0. In particular, whether n = 1, 2, it implies bounded degree-n total persistence. ♦ Theorem 4. 1.15 ([23]). Let M be a triangulable, compact metric space that implies bounded degree-q total persistence for some real number 1 ≤ q < ∞. Consider f, g : M → R two tame Lipschitz functions.

Then, there exists a constant D M , that depends on M , such that for all p ≥ q and for any n ∈ N

d p (dgm n (f ), dgm n (g)) ≤ C 1/p ||f -g|| 1-q p ∞ , where C = D M max{Lip(f ) q , Lip(g) q }.
Proof. Consider without loss of generality the p-th distance with the infinity norm. Let γ be a matching that realizes the bottleneck distance Moreover, it is possible to assume that all these points also satisfy

d ∞ (dgm n (f ), dgm n (g)) = max x∈dgm n (f ) ||x -γ(x)|| ∞ ,
||x -γ(x)|| ∞ ≤ ||x -∆ x || ∞ + ||γ(x) -∆ γ(x) || ∞ , (4.4)
where by ||x -∆ x || ∞ we mean the distance between a point and its orthogonal projection onto the diagonal. Indeed, if a point x ∈ dgm n (f ) does not satisfy inequality (4.4), then

||x -∆ x || ∞ + ||γ(x) -∆ γ(x) || ∞ < ||x -γ(x)|| ∞ , which implies that ||x -∆ x || ∞ < ||x -γ(x)|| ∞ and ||x -∆ γ(x) || ∞ < ||x -γ(x)|| ∞ .
But then, matching x and γ(x) with their projections costs less than pairing x with γ(x). Thus, without risking optimality, we can assume (4.4) is satisfied for every x ∈ dgm n (f ). Then, given any p ≥ q and using inequalities (4.3) and (4.4), we can write

d p (dgm n (f ),dgm n (g)) p ≤ x∈dgm n (f ) ||x -γ(x)|| p ∞ ≤ x∈dgm n (f ) ε p-q ||x -γ(x)|| q ∞ ≤ ε p-q x∈dgm n (f ) ||x -∆ x || ∞ + ||γ(x) -∆ γ(x) || ∞ q = 2 q ε p-q x∈dgm n (f ) ||x -∆ x || ∞ + ||γ(x) -∆ γ(x) || ∞ 2 q For q ≥ 1 the map ϕ(u) = u q is convex in [0, ∞), thus ϕ u + v 2 ≤ ϕ(u) + ϕ(v) 2 .
Applying this we obtain

d p (dgm n (f ),dgm n (g)) p ≤ 2 q ε p-q x∈dgm n (f ) 1 2 (||x -∆ x || q ∞ + ||γ(x) -∆ γ(x) || q ∞ ) = 2 q-1 ε p-q   x∈dgm n (f ) ||x -∆ x || q ∞ + x∈dgm n (f ) ||γ(x) -∆ γ(x) || q ∞   = 2 q-1 ε p-q (Pers q (dgm n (f )) + Pers q (dgm n (g)))
.

The last equality follows from the fact that an optimal matching between a persistence diagram and the empty one for the infinite norm consists in pairing each point with its orthogonal projection onto the diagonal. By hypothesis on the space M and definition 4.1.13, there exists a constant C M such that

d p (dgm n (f ), dgm n (g)) p ≤ 2 q-1 ε p-q C M [Lip(f ) q + Lip(g) q ] ≤ 2 q ε p-q C M max{Lip(f ) q , Lip(g) q }
Finally, recalling that ε = ||f -g|| ∞ , we get

d p (dgm n (f ), dgm n (g)) ≤ C 1/p ||f -g|| 1-q p ∞ ,
where C = 2 q C M max{Lip(f ) q , Lip(g) q }.

Note that this theorem just establishes Hölder continuity, not Lipschitz. Moreover, a constant upper bound is obtained only when p = 1 (and hence q = 1).

The space of persistence diagrams

So far, we have studied persistence diagrams of q-tame modules, which consists of a locally finite multiset of {(r 1 , r 2 ) ∈ R 2 : r 1 < r 2 } together with the diagonal with infinite multiplicity. Recall that the essential part has been removed, since it can be treated separately when comparing diagrams. Let us introduce the notation

Ω := {(r 1 , r 2 ) ∈ R 2 : r 1 < r 2 }, ∂Ω := {(r, r) : r ∈ R}.
Recovering the measure-theoretic point of view of remark 3.2.11, these persistence diagrams can be expressed as point measures supported on Ω

ν = x∈X n x δ x ,
where n x ∈ N is the multiplicity of the point, δ x denotes the Dirac mass located on {x} and X are the points of the locally finite multiset dgm(V) ∩ Ω, counted without multiplicity. Furthermore, most of the definitions and results of the previous subsection are general enough to be applied to any point measure on Ω. Indeed, partial matchings between point measures are well-defined, considering the locally finite sets X counted with multiplicity. Hence, so are distances d p for 1 ≤ p ≤ ∞, where the infimum is also attained. As a consequence, given two persistence diagrams of q-tame modules dgm 1 and dgm 2 and their associated point measures µ 1 and µ 2 , we have that d p (dgm 1 , dgm 2 ) = d p (µ 1 , µ 2 ), for any 1 ≤ p ≤ ∞.

In conclusion, it is possible to work in the more general framework of point measures, with d p distances between them. Until the end of this chapter we will adopt this measure-theoretic viewpoint. As happened with persistence modules, this generalization will lead to interesting results useful in the practical case of studying a data set.

Firstly, some notions must be introduced. Definition 4.2.1. The set D is the set of all point measures supported on Ω. Its elements will be called persistence diagrams too.

As we have explained before, this definition is consistent with persistence diagrams of q-tame modules without their essential parts. Observe that, given µ = x∈X n x δ x , for 1 ≤ p < ∞ and q ≥ 1, we have

Pers p (µ) = x∈X n x ||x -∂Ω|| p q ,
where ||x -∂Ω|| q denotes the distance between x ∈ Ω and its orthogonal projection onto the diagonal. If p = ∞,

Pers ∞ (µ) = sup x∈X ||x -∂Ω|| q .
Therefore, D p is the set of persitence diagrams that are at finite d p distance from the empty diagram. As we will see, this ensures that the space of persistence diagrams is a metric space.

Remark 4.2.3. In practice, persistence diagrams coming from data sets are finite, so they belong to D p . However, not all persistence diagrams of q-tame modules do. For instance, V = n∈N k[n, 2n] is q-tame, but its persistence diagram consists of all the points (n, 2n) ∈ R 2 . Hence, it is not at finite distance from the empty diagram if p < ∞. ♦ Lemma 4.2.4. (D p , d p ) is a metric space, where 1 ≤ p ≤ ∞.

Proof. Given two persistence diagrams µ, ν ∈ D p , it is clear that a subset γ of (X ∪ ∂Ω) × (Y ∪ ∂Ω) is a partial matching between µ and ν if and only if, as a subset of (Y ∪ ∂Ω) × (X ∪ ∂Ω), it is a partial matching between ν and µ. Hence, d p (µ, ν) = d p (ν, µ).

Let us show that d p (µ, ν) = 0 if and only if µ = ν. On the one hand, if µ = ν we can always take the partial matching γ = {(x, x) : x ∈ X ∪ ∂Ω}. Since ||x -x|| q = 0 and d p (µ, ν) ≥ 0, we conclude that d p (µ, ν) = 0. On the other hand, suppose d p (µ, ν) = 0. That means there exists a partial matching γ ∈ Γ(µ, ν) such that ||x -y|| q = 0 for every (x, y) ∈ γ. That is, x = y and hence µ = ν.

For the triangle inequality, consider three persistence diagrams µ, ν, τ ∈ D p with locally finite multisets X, Y and Z respectively. Given any partial matchings γ µ,ν , γ ν,τ , between µ and ν and between ν and τ respectively, we can build a partial matching γ µ,τ between µ and τ . Indeed, for any x ∈ X (points are counted with multiplicity) there exists a unique pair (x, y x ) ∈ γ µ,ν . If y x ∈ ∂Ω, take it as unique pair of γ µ,τ with x in the first coordinate. If y x ∈ Y , there exists a unique (y x , z yx ) ∈ γ ν,τ . Choose then (x, z yx ) as the x-pair of γ µ,τ . For the remaining z ∈ Z that do not appear in any chosen pair for γ µ,τ , repeat the process in the other direction. There is a unique (y z , z) ∈ γ ν,τ . If y z ∈ ∂Ω, take it as z-pair. If not, it exists a unique pair (x yz , y z ) ∈ γ µ,ν . Then, take (x yz , z) ∈ γ µ,τ . By this construction any x ∈ X and z ∈ Z appears exactly once in the chosen pairs. Therefore, γ µ,τ is a partial matching.

Let γ µ,ν and γ ν,τ be optimal partial matchings. In the case of the bottleneck distance, for any (x, z) ∈ γ µ,τ we can write

||x -z|| ∞ ≤ ||x -y|| ∞ + ||y -z|| ∞ ≤ max (x,y)∈γµ,ν ||x -y|| ∞ + max (y,z)∈γν,τ ||y -z|| ∞ = d ∞ (µ, ν) + d ∞ (ν, τ ). Therefore, d ∞ (µ, τ ) ≤ max (x,z)∈γµ,τ ||x -z|| ∞ ≤ d ∞ (µ, ν) + d ∞ (ν, τ ),
as wanted. For 1 ≤ p < ∞, a similar result is obtained using Minkowski inequality

d p (µ, τ ) ≤   (x,z)∈γµ,τ ||x -z|| p q   1/p ≤   (x,y)∈γµ,ν ||x -y|| p q   1/p +   (y,z)∈γν,τ ||y -z|| p q   1/p = d p (µ, ν) + d p (ν, τ ).
The assumption on the total persistence ensures that d p (µ, ν) is finite for any µ, ν ∈ D p . Indeed,

d p (µ, ν) ≤ d p (µ, 0) + d p (0, ν) = Pers p (µ) 1/p + Pers p (ν) 1/p < ∞.
All in all, d p :

D p × D p → [0, ∞) is a metric and (D p , d p ) is a metric space.
Whence, we equip the space D p with the distance d p .

Remark 4.2.5. Consider a data set and the induced q-tame module at the homology level. Its persistence diagram is an element of D p . Therefore, we have managed to map the entiere data set to a single point in a metric space. As a result, qualitative information (topology) has transformed into quantitaive (distances). ♦ Proposition 4.2.6 ( [START_REF] Mileyko | Probability measures on the space of persistence diagrams[END_REF]). For 1 ≤ p < ∞ the space (D p , d p ) is a Polish metric space, i.e. is complete and separable in the metric d p .

Proof. Completness can be found in theorem 6 of [START_REF] Mileyko | Probability measures on the space of persistence diagrams[END_REF]. Let us prove separability.

In order to show this, we have to find a countable dense subset in D p . Denote by |µ| the cardinality of the off-diagonal part of a persistence diagram µ ∈ D p . For α > 0, consider the map u α : D p → D p such that x ∈ u α (µ) if and only if x ∈ µ and ||x -∂Ω|| q ≥ α. Observe that, since Pers p (µ) < ∞, the cardinality of u α (µ) is finite for every α > 0. Similarly, define l α : D p → D p , where x ∈ l α (µ) if and only if x ∈ µ and ||x -∂Ω|| q < α. Now, let

S = {µ ∈ D p : |µ| < ∞, x ∈ Q 2 ∀x ∈ µ}.
Notice that S = ∞ m=0 S m , where S m = {µ ∈ S : |µ| = m}. Each S m is isomorphic to a subset of Q 2m , so countable. Hence, S is countable. We just have to prove that it is dense in D p for the p-th distance. That is, given ν ∈ D p , for all ε > 0 we have to find µ ∈ S such that d p (ν, µ) < ε.

Fix ν = x∈X n x δ x and ε > 0. Notice that

d p (l α (ν), 0) p = {x∈X:||x-∂Ω||q<α} ||x -∂Ω|| p q .
Therefore, there exists α > 0 such that d p (l α (ν), 0) < ε/2. Since the points of u α (ν) belong also to ν, a possible matching between u α (ν) and ν is to pair together the commom points and the remaining ones (i.e. l α (ν)) with the projection onto the diagonal. Note that the cost of this matching is equal to d p (l α (ν), 0). When computing the p-th distance we search for the minimum, so

d p (ν, u α (ν)) ≤ d p (l α (ν), 0) < ε/2.
On the other hand, the persistence diagram u α (ν) can be seen as a point in

R 2|uα(ν)| (recall |u α (ν)| is finite). As Q 2|uα(ν)| is dense in R 2|uα(ν)|
, we can find a point in the former, which corresponds to a persistence diagram µ ∈ S and, such that

d p (µ, u α (ν)) < ε/2. All in all, d p (ν, µ) ≤ d p (ν, u α (ν)) + d p (u α (ν), µ) < ε/2 + ε/2 = ε,
as wanted.

In spite of the fact that persistence diagrams must remain locally finite and have finite total persistence, they may have infinitely many points. Indeed, this assumption is necessary for D p to be complete, as the next example shows.

Example 4.2.7. The limit of a sequence of finite persistence diagrams can have infinitely many points. Consider µ n = n k=1 δ (0,2 -k ) . This is a Cauchy sequence because d p (µ n , µ m ) ≤ m k=n+1 2 -k = 2 -n -2 -m and the sequence {2 -k } k∈N is Cauchy. However, the number of off-diagonal points in µ n grows to infinity as n → ∞. That is, in the limit we have k≥1 δ (0,2 -k ) which has infinitely many points, though it belongs to D p . ♦ Remark 4.2.8 ( [START_REF] Lacombe | Statistics for Topological Descriptors using optimal transport[END_REF]). Although the space (D ∞ , d ∞ ) is complete (corollary 4.3.16), it is not separable for the bottleneck distance. In fact, let I ⊂ N and define the persistence diagram a I = i∈I δ (i,i+1) . For all I ⊂ N, a I ∈ D ∞ . Consider the uncountable family A = {a I :

I ⊂ N} ⊂ D ∞ . Notice that d ∞ (a I , a I ) =
√ 2/2 for any two distinct I, I ⊂ N, as an optimal matching consists in pairing all points with the diagonal. Then, let S be an arbitrary dense subset in D ∞ . By density, for each a I ∈ A there exists µ I ∈ S such that d ∞ (µ I , a I ) < √ 2/4. However, for any

I = I, d ∞ (µ I , a I ) ≥ d ∞ (a I , a I ) -d ∞ (a I , µ I ) > √ 2/4.
Therefore, inside S we must find a different persistence diagram µ I for each a I . This implies that S cannot be countable, so D ∞ is not separable. ♦

Optimal transport

The natural next stage is to introduce distances between more general measures (not only pointed ones) and use them to compare persistence diagrams. To this aim, we will present a distance based on optimal transport. Firstly, the idea behind optimal transport and the formulation that concerns us are explained. After this brief introduction, we will deal directly with the case which allows us to compare persistence diagrams. For further reading we refer to [START_REF] Villani | Optimal transport: old and new[END_REF], [START_REF] Figalli | A new transportation distance between nonnegative measures, with applications to gradients flows with dirichlet boundary conditions[END_REF] and [START_REF] Lacombe | Statistics for Topological Descriptors using optimal transport[END_REF].

Unbalanced optimal transport

Intuitively, two measures µ and ν represent two ways of distributing mass. Consider the case where transporting mass from the first configuration to the second has some cost. The goal is to find the optimal way of transporting the mass from the first to the second configuration, minimizing this cost. The classical formulation of the transport problem is the Kantorovich formulation: consider X and Y two Polish spaces and µ, ν two Borel non-negative finite measures supported on X , Y, respectively. Let c : X × Y → R + be a lower-semicontinuous non-negatively valued cost function. The optimal transport problem reads inf π∈Π(µ,ν) X ×Y c(x, y)dπ(x, y) , (4.5)

where Π(µ, ν) = {π measure on X × Y :

p 1 #π = µ, p 2 #π = ν} ,
is the set of transport plans between µ and ν, for p 1 : X × Y → X and p 2 : X × Y → Y the natural projections. The pushforward conditions are equivalent to the fact that, for any Borel subset A ⊂ X , B ⊂ Y,

π(A × Y) = µ(A), π(X × B) = ν(B).
Observe that both measures are forced to have the same mass

µ(X ) = p 1 #π(X ) = π(X × Y) = p 2 #π(Y) = ν(Y).
As a matter of fact, transport plans always exist, it is enough to consider the product measure 1 µ(X ) µ⊗ν. The advantage of this formulation is that optimal transport plans do always exist, i.e. the minimum is attained (see theorem 4.1 of [START_REF] Villani | Optimal transport: old and new[END_REF]). Besides, in some important situations, optimal transport plans and maps coincide, as stated in theorem 9.4 of [START_REF] Villani | Optimal transport: old and new[END_REF].

Theorem 4.3.1. Consider two probability measures ρ, µ in R 2 with finite second moment and let c(x, y) = ||x -y|| 2 be the cost function. Assume ρ is absolutely continuous with respect to the Lebesgue measure. Then, the optimal transport plan π ∈ Π(ρ, µ) is unique and it is induced by a transport map. That is, there exists a measurable map T µ : R 2 → R 2 , which is the gradient of a convex function T µ = ∇φ, such that π = (id, T µ )#ρ.

With this formulation, distances between measures can be defined, e.g. the p-Wasserstein distance, where the cost function is d(x, y) p ,

W p (µ, ν) = inf π∈Adm(µ,ν) X ×X d(x, y) p dπ(x, y) 1/p . (4.6)
Nevertheless, persistence diagrams may have different number of off-diagonal points, and even infinite. Therefore, Kantorovich formulation is not enough for us, since it is only capable of comparing measures of same finite mass. Although some tries have been made in order to extend this theory to measures with different mass, the more interesting is the one developed by Figalli, A. in [START_REF] Figalli | A new transportation distance between nonnegative measures, with applications to gradients flows with dirichlet boundary conditions[END_REF], since it also deals with Radon measures of infinite mass and so overcomes the two problems. This approach is developed for Radon measures supported on a bounded open proper subset X of R m . The idea is to consider this set together with its boundary X = X ∂X . Intuitively, when transporting the mass from the first configuration to the second, we can use ∂X as an infinite reservoir. In this way, we can take as much mass as we wish from the boundary or give it back, as long as we pay the cost. The formulation of this optimal transport problem is as follows: given µ, ν two Radon measures supported on X , the problem reads

inf π∈Adm(µ,ν) X × X c(x, y)dπ(x, y) , (4.7)
where Adm(µ, ν) is the set of admissible transport plans defined as

Adm(µ, ν) = π measure on X × X : p 1 #π| X = µ, p 2 #π| X = ν ,
being p i : X × X → X the natural projections. Again, the pushforward restrictions are equivalent to the fact that, for any Borel sets A, B ⊂ X ,

π(A × X ) = µ(A), π( X × B) = ν(B). (4.8)
It is always possible to define an admissible transport plan, the trivial one which sends all mass of µ and ν to the boundary. In addition, optimal plans always exists too, as shown in [START_REF] Figalli | A new transportation distance between nonnegative measures, with applications to gradients flows with dirichlet boundary conditions[END_REF]. Similarly to Kantorovich formulation and the p-Wasserstein distance, it is also possible to define a distance between measures using (4.7), which is called optimal transport distance.

Notice that the approach taken in [START_REF] Figalli | A new transportation distance between nonnegative measures, with applications to gradients flows with dirichlet boundary conditions[END_REF] is developed for X bounded, while persistence diagrams are supported on Ω, obviously not bounded. Luckily for us, this optimal transport problem can be extended to Ω with additional care. This is done in the next subsection for a larger set of measures, not only D p . Of course, implications of the results obtained will be highlighted for the particular case of persistence diagrams. Consequently, it will be possible to compare the optimal transport distance with the d p distances defined in the previous sections.

Optimal transport distance

Given Ω the open half-plane and ∂Ω the diagonal {(r, r) : r ∈ R}, consider Ω = Ω ∂Ω. Denote by d : Ω× Ω → [0, ∞) the metric ||•|| q on Ω with 1 ≤ q ≤ ∞, though other distances may be used. Consider p ∂Ω : Ω → ∂Ω the orthogonal projection onto the diagonal. Letting M(Ω) be the set of non-negative Radon measures supported on Ω, we introduce the following notion.

µ(A)d(A, ∂Ω) p ≤ A d(x, ∂Ω) p dµ(x) ≤ Ω d(x, ∂Ω) p dµ(x) = Pers p (µ) < ∞. (4.9)
This implies that µ(A) < ∞. In particular, µ is automatically a Radon measure, because for any compact set K of Ω, d(K, ∂Ω) > 0. ♦ Definition 4.3.4. The space of persistence measures of parameter p, with 1 ≤ p ≤ ∞, is the space of non-negative Radon measures supported on Ω that have finite total persistence, i.e.

M p = M p (Ω) = {µ ∈ M(Ω) : Pers p (µ) < ∞} .
Notice that D p , the space of persistence diagrams of parameter p given by definition 4.2.2, is the subspace of M p consisting only of point measures. As it happened with D p , the finiteness assumption on the total persistence of µ ∈ M p will ensure that the optimal transport distance, defined below, is finite. Definition 4.3.5. The optimal transport distance between two measures µ, ν ∈ M p , with 1 ≤ p < ∞, is

OT p (µ, ν) = inf π∈Adm(µ,ν) Ω× Ω d(x, y) p dπ(x, y) 1/p = inf π∈Adm(µ,ν) C p (π) 1/p . For p = ∞, given two measures µ, ν ∈ M ∞ we define OT ∞ (µ, ν) = inf π∈Adm(µ,ν) sup (x,y)∈spt(π) d(x, y) = inf π∈Adm(µ,ν) C ∞ (π).
Admisible transport plans for which the infimum is attained are called optimal.

The set of these optimal transport plans is denoted by Opt p (µ, ν).

Observe that OT p is defined for Radon measures of infinite mass, as long as their total persistence is finite. Remark 4.3.6. Consider a finite collection of finite point measures {ν i } n i=1 on Ω (e.g. comes from the computation of the persistence diagrams of a collection of samples). Thanks to finiteness, an open bounded subset Y of Ω containing the support of all the measures can be obtained. It is possible to choose Y as a triangle with one of the boundaries on ∂Ω and such that d(x, ∂Y) = d(x, ∂Ω) for all x that belongs to the supports. This choice implies that, computing the optimal transport distance between ν i and ν j as in [START_REF] Figalli | A new transportation distance between nonnegative measures, with applications to gradients flows with dirichlet boundary conditions[END_REF] (using all the boundary ∂Y as a reservoir) gives the same result and same optimal admissible transport plan as computing the optimal transport in Ω following definition 4.3.5, since sending mass to ∂Y ∩ ∂Ω is the cheapest. Hence, when analyzing data sets, persistence diagrams may be considered as finite point measures on a bounded subset Y of Ω and results from [START_REF] Figalli | A new transportation distance between nonnegative measures, with applications to gradients flows with dirichlet boundary conditions[END_REF] may be directly applied. ♦

Optimal admissible transport plans π ∈Opt p (µ, ν) can be assumed to be supported on E Ω := Ω × Ω\∂Ω × ∂Ω. That is, π| ∂Ω×∂Ω = 0. Indeed, it is easy to check that the measure π -π| ∂Ω×∂Ω is also an admissible transport plan for µ and ν. For example, for any

A ⊆ Ω Borel set (π -π| ∂Ω×∂Ω )(A× Ω) = π(A× Ω)-π((A× Ω)∩(∂Ω×∂Ω)) = π(A× Ω)-π(∅) = µ(A). Moreover, it is clear that C p (π -π| ∂Ω×∂Ω ) ≤ C p (π) for any 1 ≤ p ≤ ∞.
A relevant characteristic of this formulation is that optimal admissible transport plans always exist.

Proposition 4.3.7 ([6]). Let µ, ν ∈ M p with 1 ≤ p ≤ ∞. Then, Opt p (µ, ν) is nonempty.
Proof. Assume for the moment that Adm(µ, ν) is sequentially compact (1) for the vague topology and C p : Adm(µ, ν) → R is lower semicontinuous w.r.t vague topology [START_REF] Ghrist | Barcodes: the persistent topology of data[END_REF]. Let {π n } n be a minimizing sequence of admissible plans, i.e.

lim inf n→∞ C p (π n ) = OT p p (µ, ν).
Since Adm(µ, ν) is sequentially compact, there exists a subsequence {π n k } k that converges vaguely to an admissible plan π. By lower semicontinuity of C p , we have that

C p (π) ≤ lim inf k→∞ C p (π n k ) = OT p p (µ, ν).
But the optimal transport distance is defined as the infimum of the C p (π). Therefore, OT p p (µ, ν) = C p (π), and then π ∈ Opt p (µ, ν). To finish the proof we need to show the assumptions we made at the beginning:

1. Admissible transport plans may be assumed to be supported on E Ω , so it is enough to prove sequentially compactness there. We first show that Adm(µ, ν) is relatively compact for the vague topology, using proposition B.0.10. Secondly, we prove that it is closed. This concludes the proof.

Let K ⊂ E Ω be an arbitrary compact set. It is easy to see that there always exist two compact sets

K 1 , K 2 ⊂ Ω such that K ⊂ (K 1 × Ω) ∪ ( Ω × K 2 ). Let π ∈ Adm(µ, ν). Then, π(K) ≤ π((K 1 × Ω) ∪ ( Ω × K 2 )) ≤ π(K 1 × Ω) + π( Ω × K 2 ) = µ(K 1 ) + ν(K 2 ) < ∞. (4.10)
Therefore, sup{π(K) : π ∈ Adm(µ, ν)} < ∞ is satisfied for any compact set K of E Ω . By proposition B.0.10 we conclude that Adm(µ, ν) is relatively compact.

On the other hand, let

{π n } n ⊂ Adm(µ, ν) such that π n v - → π ∈ M(E Ω ).
In order to prove that π is admissible, we need to verify that both marginals of π on Ω are still µ and ν. Notice that

p 1 #π n | Ω = µ for all n ∈ N. Thus, if p 1 #π n | Ω converges vaguely to p 1 #π| Ω in M(E Ω ), then p 1 #π| Ω = µ as wanted. By (B.2) we just have to show that, given any f ∈ C c (Ω), lim n→∞ ϕ f (p 1 #π n | Ω ) = ϕ(p 1 #π| Ω ).
In fact, since π n converges vaguely to π, using (B.2) again we get

lim n→∞ ϕ f (p 1 #π n | Ω ) = lim n→∞ Ω f (x)d(p 1 #π n | Ω )(x) = lim n→∞ E Ω f (x)dπ n (x, y) = E Ω f (x)dπ(x, y) = Ω f (x)d(p 1 #π| Ω )(x) = ϕ f (p 1 #π| Ω ).
Analogously we obtain that the second marginal of π on Ω is ν. All in all, π ∈ Adm(µ, ν) and the set of admissible transport plans is closed in M(E Ω ).

We start proving lower semicontinuity for

p ∈ [1, ∞). Let {π n } n ⊂ Adm(µ, ν) such that π n v - → π.
We have seen that π ∈ Adm(µ, ν). Consider the measure on Ω × Ω given by

π n (A) = A d(x, y) p dπ n (x, y).
Indeed, we can assume π n ∈ M(E Ω ), so π n is also supported on E Ω . Moreover, it is a Radon measure. This is deduced from the fact that, for any compact set K ⊂ E Ω , since K is bounded and inequality (4.10) is satisfied,

π n (K) = K d(x, y) p dπ n (x, y) ≤ Dπ n (K) < ∞.
All in all, π n ∈ M(E Ω ) for every n ∈ N. Notice that

π n (E Ω ) = C p (π n ), π (E Ω ) = C p (π).
Using the characterization of vague convergence (B.2) we have that, for any bounded Borel set

A ⊂ E Ω such that π(∂A) = 0, lim n→∞ π n (A) = lim n→∞ A d(x, y) p dπ n (x, y) = lim n→∞ E Ω 1 A d(x, y) p dπ n (x, y) = E Ω 1 A d(x, y) p dπ(x, y) = A d(x, y) p dπ(x, y) = π (A),
C p (π n ) = lim inf n→∞ π n (E Ω ) ≥ π (E Ω ) = C p (π). That is, C p is lower semicontinuous. For p = ∞, consider as before {π n } n ⊂ Adm(µ, ν) such that π n v - → π ∈ Adm(µ, ν). Let r ∈ R which satisfies r > lim inf n→∞ C ∞ (π n ). (4.11)
and consider

U r = {(x, y) ∈ E Ω : d(x, y) > r}. Observe that, by definition of C ∞ (π n ), lim inf n→∞ π n (U r ) = 0. Since U r is
π(U r ) ≤ lim inf n→∞ π n (U r ) = 0.
As a result, the support of π is contained in the complementary of U r . Therefore, C ∞ (π) ≤ r, and this holds for any r ∈ R satisfying (4.11).

If C ∞ is not lower semicontinuous, then C ∞ (π) > lim inf n→∞ C ∞ (π n ). However, in that case we can find r ∈ R such that C ∞ (π) > r > lim inf n→∞ C ∞ (π n ), in contradiction with C ∞ (π) ≤ r.
After that, the next lemma presents the expected relation between the optimal transport distance of a measure µ ∈ M p to the zero measure and the total persistence of µ.

Lemma 4.3.8. For any µ ∈ M p , 1 ≤ p ≤ ∞, OT p p (µ, 0) = Pers p (µ), OT ∞ (µ, 0) = Pers ∞ (µ).
Proof. We begin characterizing the admissible plans between µ and 0. Consider π ∈Adm(µ, 0). In particular it satisfies

π(Ω × Ω) = µ(Ω), π( Ω × Ω) = 0.
Notice that Ω × Ω = Ω × Ω ∂Ω × Ω. Therefore, the last equality implies that

π(Ω × Ω) = 0, π(∂Ω × Ω) = 0.
As mentioned before, we assume that π(∂Ω × ∂Ω) = 0. Hence, if we write the total space as the disjoint union On the other hand, being admissible implies

Ω × Ω = Ω × Ω ∂Ω × ∂Ω Ω × ∂Ω ∂Ω × Ω, we can conclude that π( Ω × Ω) = π(Ω × ∂Ω),
p 1 #π| Ω = µ, p 2 #π| Ω = 0,
so that if p ∂Ω : Ω → ∂Ω is the orthogonal projection onto the diagonal, we have for any π ∈Adm(µ, 0),

Ω×∂Ω d(x, p ∂Ω (x)) p dπ(x, y) = Ω× Ω d(x, p ∂Ω (x)) p dπ(x, y) = Ω× Ω(d(•, p ∂Ω (•)) p • p 1 )(x, y)dπ(x, y) = Ω d(x, p ∂Ω (x)) p d(p 1 #π)(x).
Observe that the map d(•, p ∂Ω (•)) p is zero on the diagonal. Therefore,

Ω×∂Ω d(x, p ∂Ω (x)) p dπ(x, y) = Ω d(x, p ∂Ω (x)) p d(p 1 #π)(x) = Ω d(x, p ∂Ω (x)) p dµ.
In particular, it does not depend on π. For any (x, y) ∈ Ω × ∂Ω, d(x, p ∂Ω (x)) p ≤ d(x, y) p . This implies that

Ω d(x, p ∂Ω (x)) p dµ = Ω×∂Ω d(x, p ∂Ω (x)) p dπ(x, y) ≤ Ω×∂Ω d(x, y) p dπ(x, y)
for any admissible transport plan between µ and 0. That is, it is an inferior bound, and as a result

Ω d(x, p ∂Ω (x)) p dµ ≤ inf π∈Adm(µ,0) Ω×∂Ω d(x, y) p dπ(x, y) = OT p p (µ, 0).
In order to finish the proof we just need to find and admissible transport plan π ∈Adm(µ, 0) such that

Ω×∂Ω d(x, y) p dπ(x, y) = Ω d(x, p ∂Ω (x)) p dµ(x) = Ω d(x, ∂Ω) p dµ(x)
To define π consider the following. Equip Ω with the measure μ defined by μ(A) = µ(A ∩ Ω) for any Borel set A ⊆ Ω. Notice that μ(∂Ω) = 0. On the other hand, equip Ω with the measure ν defined on the Borel sets of Ω as ν(A) = ν(A ∩ ∂Ω), where ν is any probability measure on ∂Ω. Notice that in this case ν(Ω) = 0. Consider the map

F : Ω × Ω → Ω × Ω (x, y) → (p 1 (x, y), p ∂Ω • p 1 (x, y)),
and the measure π = F #(μ ⊗ ν) on Ω × Ω, which is given by

π(A × B) = μ ⊗ ν(F -1 (A × B)) = μ ⊗ ν(p -1 1 (A) ∩ (p ∂Ω • p 1 ) -1 (B)).
It is an admissible transport plan for µ and 0. Indeed, π ∈ M( Ω × Ω), since μ, ν ∈ M( Ω). Moreover, for any Borel sets A, B ⊆ Ω,

π(A × Ω) = μ ⊗ ν(p -1 1 (A) ∩ (p ∂Ω • p 1 ) -1 ( Ω)) = μ ⊗ ν(A × Ω) = μ(A)ν( Ω) = µ(A)ν(∂Ω) = µ(A), π( Ω × B) = μ ⊗ ν(p -1 1 ( Ω) ∩ (p ∂Ω • p 1 ) -1 (B)) = μ ⊗ ν(∅) = 0.
All in all, π ∈Adm(µ, 0). Let us see that it is the transport plan we were looking for. Using the properties of the pushforward and the fact that μ| ∂Ω = 0 and ν| Ω = 0 we obtain

Ω×∂Ω d(x, y) p dπ(x, y) = Ω× Ω d(x, y) p dπ(x, y) = Ω× Ω d(x, y) p d (F #μ ⊗ ν) = Ω× Ω (d(•, •) p • F ) (x, y)d(μ ⊗ ν) = Ω× Ω d(x, p ∂Ω (x)) p d(μ ⊗ ν) = Ω Ω d(x, p ∂Ω (x)) p dν(y)dμ(x) = Ω ∂Ω d(x, p ∂Ω (x)) p dν(y)dμ(x) = Ω d(x, p ∂Ω (x)) p ∂Ω dν(y) dμ(x) = Ω d(x, p ∂Ω (x)) p dμ(x) = Ω d(x, p ∂Ω (x)) p dµ(x) = Ω d(x, ∂Ω) p dµ(x).
The case p = ∞ is very similar. Given π ∈ Adm(µ, 0) we have seen that spt(π) ⊂ Ω × ∂Ω. Notice that, for any x ∈ spt(µ), exists y ∈ ∂Ω such that (x, y) ∈ spt(π). Therefore,

Pers ∞ (µ) = sup x∈spt(µ) d(x, ∂Ω) ≤ sup (x,y)∈spt(π) d(x, ∂Ω) ≤ sup (x,y)∈spt(π)
d(x, y), since d(x, ∂Ω) ≤ d(x, y) for all (x, y) ∈ Ω × ∂Ω. This is true for any admissible transport plan, so we conclude that Pers ∞ (µ) ≤ OT ∞ (µ, 0).

Analogously to the previous part, to finish we just need to prove that there exists and admissible transport plan π such that C ∞ (π) = Pers ∞ (µ). Consider π = F #(μ ⊗ ν) as before. Let (x, y) ∈ spt(π) and suppose y = p ∂Ω (x). Then, we can find neighborhoods U and V in Ω, of x and y respectively, such that p ∂Ω (U )

∩ V = ∅. Therefore, p -1 1 (U ) ∩ (p ∂Ω • p 1 ) -1 (V ) = ∅. But this provides the contradiction 0 = μ ⊗ ν(p -1 1 (U ) ∩ (p ∂Ω • p 1 ) -1 (V )) = π(U × V ) > 0,
where the right hand side is positive because (x, y) ∈ spt(π). All in all, (x, y) ∈ spt(π) implies y = p ∂Ω (x). Since the projection of a boundary point is itself, we can write sup

(x,y)∈spt(π) d(x, y) = sup (x,y)∈spt(π) : x∈Ω d(x, ∂Ω) = sup x∈spt(µ) d(x, ∂Ω),
where the last equality follows from p 1 #π| Ω = µ.

As we expected, OT p defines a true metric on M p . Proposition 4.3.9

([6]). Let µ, ν ∈ M p with 1 ≤ p ≤ ∞. Then, OT p is a distance on M p .
Proof. Let µ, ν, τ ∈ M p , we divide the proof into two parts according to the value of p. Firstly, consider 1 ≤ p < ∞. For the symmetry property, note that given π ∈ Adm(µ, ν) the homeomorphism φ : (x, y) → (y, x) provides an admisible plan in Adm(ν, µ), and viceversa. Therefore, it is clear that OT p (µ, ν) = OT p (ν, µ).

Assume OT p (µ, ν) = 0. Then, there exists π ∈ Adm(µ, ν) such that

E Ω d(x, y) p dπ(x, y) = 0.
Hence, d(x, y) p = 0 π-a.e. This, together with the fact that d(x, y) p = 0 if and only if x = y, implies that π is supported on {(x, x) : x ∈ Ω}. Therefore, for any Borel set

A ⊂ Ω, µ(A) = π(A × Ω) = π(A × A) = π( Ω × A) = ν(A).
That is, µ = ν. On the other hand, suppose µ = ν. Consider the measure μ on Ω defined by μ(A) = µ(A ∩ Ω). Let F : Ω → Ω × Ω; F (x) = (x, x). Then, it is easy to see that π = F #μ defines an admissible transport plan between µ and itself such that Ω× Ω d(x, y) p dπ(x, y) = 0. Hence, OT p (µ, µ) = 0.

To prove the triangle inequality we need an adaptation of the glueing lemma 2.1 of [START_REF] Figalli | A new transportation distance between nonnegative measures, with applications to gradients flows with dirichlet boundary conditions[END_REF]. In our case it states that, for any π 12 ∈ Opt p (µ, ν), π 23 ∈ Opt p (ν, τ ) there exists γ ∈ M( Ω × Ω × Ω) such that

p 12 #γ| E Ω = π 12 , p 23 #γ| E Ω = π 23 , (4.12)
where p ij are the canonical projections, and the restrictions are concentrated on {(x, x) : x ∈ ∂Ω} on ∂Ω × ∂Ω. Define on Ω × Ω the measure

η(E) = (E,x,z) ( Ω,y)
dγ(x, y, z).

for any Borel E ⊂ Ω × Ω. Then, for any Borel subsets A, B ⊂ Ω,

η(A × Ω) = A Ω Ω dγ(x, y, z) = γ(A × Ω × Ω) = π 12 (A × Ω) = µ(A), η( Ω × B) = Ω Ω B dγ(x, y, z) = γ( Ω × Ω × B) = π 23 ( Ω × B) = τ (B).
Therefore, η ∈ Adm(µ, τ ). By the triangle and Minkowski inequality we obtain

OT p (µ, τ ) ≤ Ω× Ω d(x, z) p dη(x, z) 1/p = Ω× Ω× Ω d(x, z) p dγ(x, y, z) 1/p ≤ Ω3 d(x, y) p dγ(x, y, z) 1/p + Ω3 d(y, z) p dγ(x, y, z) 1/p = Ω2 d(x, y) p d(p 12 #γ)( x, y) 1/p + Ω2 d(y, z) p d(p 23 #γ)(y, z) 1/p
.

Since on ∂Ω × ∂Ω the measures p 12 #γ and p 23 #γ are concentrated on {(x, x) :

x ∈ ∂Ω} (where the distance function is zero) and they satify (4.12), the last two integrals can be written as

OT p (µ, τ ) ≤ E Ω d(x, y) p d(p 12 #γ)(x, y) 1/p + E Ω d(y, z) p d(p 23 #γ)(y, z) 1/p = E Ω d(x, y) p dπ 12 (x, y) 1/p + E Ω d(y, z) p dπ 23 (y, z) 1/p = OT p (µ, ν) + OT p (ν, τ ).
Secondly, let p = ∞. Given π ∈ Adm(µ, ν), the same homeomorphism as before provides and element of Adm(ν, µ) with the same support as π, and viceversa. It is clear then that OT ∞ (µ, ν) = OT ∞ (ν, µ).

If OT ∞ (µ, ν) = 0, there exists π ∈ Adm(µ, ν) such that sup (x,y)∈spt(π) d(x, y) = 0. This implies that spt(π) ⊆ {(x, x) : x ∈ Ω}. We conclude as before µ = ν. Suppose µ = ν and define π = F #µ as previously. This measure is concentrated on

E Ω ∩ {(x, x) : x ∈ Ω}. Hence, C ∞ (π) = 0, which implies OT ∞ (µ, µ) = 0.
For the triangle inequality we proceed analogously. Given π 12 ∈ Opt p (µ, ν) and π 23 ∈ Opt p (ν, τ ) we use again the glueing lemma to obtain γ and we define the same measure η. Notice that, for any (x, z) ∈ spt(η), there exists at least one y ∈ Ω such that (x, y, z) ∈ spt(γ). Therefore,

OT ∞ (µ, τ ) ≤ C ∞ (η) = sup (x,z)∈spt(η) d(x, z) ≤ sup (x,z)∈spt(η):(x,y,z)∈spt(γ) d(x, y) + d(y, z) ≤ sup (x,y)∈spt(p 12 #γ) d(x, y) + sup (y,z)∈spt(p 23 #γ) d(y, z).
Again, the fact that the marginals of γ are concentrated on the diagonal on ∂Ω × ∂Ω (where d is zero) and equalities (4.12) lead to OT ∞ (µ, τ ) ≤ sup

= C ∞ (π 12 ) + C ∞ (π 23 ) = OT ∞ (µ, ν) + OT ∞ (ν, τ ).
To finish the proof notice that finite total persistence and triangle ineguality implies OT p :

M p × M p → [0, ∞).
Hence, we equip M p with the optimal transport distance OT p . In the particular case of persistence diagrams, the following is satisfied.

Proposition 4.3.10 ([6]). For µ, ν ∈ D p ⊂ M p , with 1 ≤ p ≤ ∞, OT p (µ, ν) = d p (µ, ν).
That is, the optimal transport distance is an extension of the distance d p .

Proof. Let us sketch the proof when p = ∞. For full arguments we refer to proposition 3.5 and 3.23 of [START_REF] Lacombe | Statistics for Topological Descriptors using optimal transport[END_REF].

Let a, b ∈ D ∞ such that a = i∈I δ x i and b = j∈J δ y j , where I, J are the sets of indices, possibly infinite. Consider π ∈ Adm(a, b). It is easy to see that the marginal constraints imply spt(π) ⊂ {x i } i∈I ∪ ∂Ω × {y j } j∈J ∪ ∂Ω. Moreover, we can always assume that the mass π({x i } × ∂Ω) (resp. π(∂Ω × {y j }) is sent on the projection of x i (resp. y j ). Therefore, an element of Opt(a, b) can be written as a bystochastic matrix indexed on (-J ∪ I) × (-I ∪ J). Denoting by S the set of all these matrices and defining

C ij = d(x i , y j ) i, j > 0, C ij = d(x i , p ∂Ω (x i )) i > 0, j < 0, C ij = d(p ∂Ω (y j ), y j ) i < 0, j > 0, C ij = 0 i, j < 0, it is immediate that OT ∞ (a, b) = inf Q∈S sup{C ij : (i, j) ∈ spt(Q)}. Notice that, for any Q ∈ S, k ∈ N and different indices {i 1 , . . . , i k } ⊂ -J ∪ I, we have k = k k =1 j∈-I∪J Q i k j = j∈-I∪J k k =1 Q i k j ⇒ Card{j : ∃k (i k , j) ∈ spt(Q)} ≥ k.
By Hall's marriage theorem exists a permutation matrix P with spt(P ) ⊂ spt(Q). Consequently, if S is the set of all permutation matrices indexed on (-J ∪ I) × (-I ∪ J), Thanks to the equality OT p = d p on D p , all stability results for persistence diagrams developed in section 4.1 are true when using optimal transport distance instead. Those statements can be seen as an approach to characterize convergence between persistence diagrams. In the case of the space of persistence measures that characterization is clearer, and relates vague and weak convergence to optimal transport convergence. Proof. Let us prove the direct implication. The proof of the converse implication can be found in theorem 3.7 of [START_REF] Lacombe | Statistics for Topological Descriptors using optimal transport[END_REF].

sup{C ij : (i, j) ∈ spt(Q)} ≥ inf P ∈S sup{C ij : (i, j) ∈ spt(P )} = d ∞ (a, b) ⇒ OT ∞ (a, b) ≥ d ∞ (a, b).
Assume that lim n→∞ OT p (µ n , µ) = 0. Since OT p is a distance in M p we can apply the triangle inequality and obtain To prove the vague convergence of µ n to µ it is enough to show that, for any

OT p (µ n , 0) ≤ OT p (µ n , µ) + OT p (µ, 0) ⇒ OT p (µ n , 0) -OT p (µ, 0) ≤ OT p (µ n , µ).
f ∈ C c (Ω), lim n→∞ ϕ f (µ n ) = ϕ f (µ). Let then f ∈ C c (Ω)
, with support contained in some compact set K of Ω. For this compact set K we have that 0 < d(K, ∂Ω) < ∞. Hence, by remark 4.3.3, µ n (K) < ∞ for every n ∈ N.

Thanks to Stone-Weierstrass theorem, for any ε > 0 there exists a Lipschitz function f ε , with constant L ε , whose support is also contained in K and such that ||f -

f ε || ∞ ≤ ε. Fixing ε > 0, |ϕ f (µ n ) -ϕ f (µ)| = Ω f dµ n - Ω f dµ = Ω f dµ n - Ω f ε dµ n + Ω f ε dµ n - Ω f dµ + Ω f ε dµ - Ω f ε dµ ≤ Ω (f -f ε )dµ n + Ω (f ε -f )dµ + Ω f ε dµ n - Ω f ε dµ . Because both f and f ε have support contained in K, Ω (f -f ε )dµ n = K (f -f ε )dµ n ≤ K |f -f ε | dµ n ≤ µ n (K) sup x∈K |f (x) -f ε (x)| ≤ µ n (K)ε.
Proceeding analogously for the term (ff ε )dµ we get (4.9). Then, for every M > 0 exists n ∈ N such that µ n (K) > M . That is, we can find a subsequence {µ n k (K)} k which tends to infinity. But then the subsequence {Pers p (µ n k )} k tends to infinity too. However, we have already proven that the sequence Pers p (µ n ) has finite limit, and the same should satisfy any of its subsequences. Therefore, we get a contradiction and conclude that sup k µ k (K) is finite. Hence,

|ϕ f (µ n ) -ϕ f (µ)| ≤ µ n (K)ε + µ(K)ε + Ω f ε dµ n - Ω f ε dµ Suppose sup k µ k (K) is not finite. Denote 1/δ = d(K, ∂Ω) so that µ n (K) ≤ δPers p (µ n ) by
|ϕ f (µ n ) -ϕ f (µ)| ≤ sup k µ k (K)ε + µ(K)ε + Ω f ε dµ n - Ω f ε dµ = (sup k µ k (K) + µ(K))ε + A n . (4.13)
Let us study the last term A n more carefully. For each n ∈ N, consider π n ∈Opt p (µ n , µ). In particular, π n are admissible plans, hence

p 1 #π n | Ω = µ n , p 2 #π n | Ω = µ ∀n ∈ N,
where p i : Ω × Ω → Ω are the canonical projections. By properties of pushforwards and knowing that f ε | ∂Ω = 0, we obtain

Ω f ε (x)dµ n (x) = Ω f ε (x)d(p 1 #π n )(x) = Ω f ε (x)d(p 1 #π n )(x) = Ω× Ω(f ε • p i )(x, y)dπ n (x, y) = Ω× Ω f ε (x)dπ n (x, y).
Similarly, y). As a result, since f ε has support in K and Lipschitz constant L ε , the last term is bounded by

Ω f ε (y)dµ(y) = Ω× Ω f ε (y)dπ n (x,
A n = Ω f ε dµ n - Ω f ε dµ = Ω× Ω f ε (x)dπ n (x, y) - Ω× Ω f ε (y)dπ n (x, y) = Ω× Ω(f ε (x) -f ε (y))dπ n (x, y) ≤ Ω× Ω |f ε (x) -f ε (y)| dπ n (x, y) = (K× Ω)∪( Ω×K) |f ε (x) -f ε (y)| dπ n (x, y) ≤ L ε (K× Ω)∪( Ω×K) d(x, y)dπ n (x, y).
Let us now apply Hölder's inequality, which is given by

||f g|| 1 ≤ ||f || p ||g|| q , (4.14)
where 1 p + 1 q = 1 and

||f || p = |f | p 1/p
, for f, g ∈ L p2 . In our case f = id and g = d(x, y). The inequality for A n becomes

A n ≤ L ε (K× Ω)∪( Ω×K) |id(x, y)| p/(p-1) dπ n 1-1 p (K× Ω)∪( Ω×K) |d(x, y)| p dπ n 1 p = L ε π n ((K × Ω) ∪ ( Ω × K)) 1-1 p (K× Ω)∪( Ω×K) d(x, y) p dπ n 1 p
.

On the one hand,

π n ((K× Ω)∪( Ω×K)) ≤ π n (K× Ω)+π n ( Ω×K) = µ n (K)+µ(K) ≤ sup k µ k (K)+µ(K).
On the other hand, due to the optimality of the transport plans π n ,

(K× Ω)∪( Ω×K) d(x, y) p dπ n 1 p ≤ Ω× Ω d(x, y) p dπ n 1 p = OT p (µ n , µ).

All in all,

A n ≤ L ε [sup k µ k (K) + µ(K)] 1-1 p OT p (µ n , µ).
Notice that L ε [sup k µ k (K) + µ(K)] 1-1 p is finite while OT p (µ n , µ) tends to zero as n tends to infinity. As a result, A n tends to zero as n → ∞, for fixed ε. Recovering inequality (4.13), for fixed ε > 0 we have lim sup

n→∞ |ϕ f (µ n ) -ϕ f (µ)| ≤ lim sup n→∞ (sup k µ k (K) + µ(K))ε + A n = (sup k µ k (K) + µ(K))ε + lim n→∞ A n = (sup k µ k (K) + µ(K))ε.
Taking the limit ε → 0, and recalling that sup k µ k (K) < ∞, we conclude that lim sup

n→∞ |ϕ f (µ n )-ϕ f (µ)| = lim ε→0 lim sup n→∞ |ϕ f (µ n )-ϕ f (µ)| ≤ lim ε→0 (sup k µ k (K)+µ(K))ε = 0. Consequently, lim sup n→∞ |ϕ f (µ n ) -ϕ f (µ)| = 0 ⇒ lim n→∞ |ϕ f (µ n ) -ϕ f (µ)| = 0.
This implies ϕ f (µ n ) → ϕ f (µ) as wanted.

These results on convergence are pretty useful in order to derive characterizations on the continuity of some vectorizations. As we will see in the next chapter, vectorizations are used to embed non linear spaces (as the space of persistence diagrams) into linear ones. This is necessary if we want to use statistical descriptors and machine learning techniques, since many of them requiere the input to live in a finite-dimensional vector space.

Lastly, we present some properties of the metric space of persistence measures (M p , OT p ). Those are coherent with the ones obtained for the space of persistence diagrams (D p , d p ). Proposition 4.3.14 ([6]). The space (M p , OT p ) is a Polish space for 1 ≤ p < ∞.

Remark 4.3.15. As we saw in remark 4.2.8, D ∞ is not separable. Analogously, the space (M ∞ , OT ∞ ) is not separable, although it can be proven to be complete (proposition 3.24 of [START_REF] Lacombe | Statistics for Topological Descriptors using optimal transport[END_REF]). ♦

We recover the following result, which can be seen as a consequence of the optimal transport topology being stronger than the vague topology.

Corollary 4. 3.16 ([6]). For 1 ≤ p ≤ ∞ the subspace D p is closed in M p for the metric OT p . In particular, this implies that:

• If p < ∞, (D p , OT p ) = (D p , d p ) is a Polish space. • If p = ∞, (D ∞ , OT ∞ ) = (D ∞ , d ∞ ) is complete.
Proof. Let 1 ≤ p ≤ ∞ and consider any sequence {µ n } n ⊂ D p such that it converges in M p to a measure µ for the OT p distance. That is, lim n→∞ OT p (µ n , µ) = 0. To prove that D p is closed in M p we need to show that µ ∈ D p . By theorems 4.3.11 and 4.3.12 we have convergence in the vague topology µ n v -→ µ. Notice that µ n ∈ D for every n ∈ N. Therefore, proposition B.0.7 implies that µ ∈ D. As it also belongs to M p , we conclude that µ ∈ D ∩ M p = D p as wanted. Hence, D p is closed in M p . Since OT p = d p and taking into consideration proposition 4.3.14 and remark 4.3.15, this proves that (D p , d p ) is complete for every value of p (a closed subspace of a complete space is complete). Moreover, we have seen in proposition 4.2.6 that for p < ∞ the space D p is separable. Therefore, (D p , d p ) is Polish for p < ∞.

Chapter 5

Vectorizations of persistence diagrams

For some scientific data sets, particular geometric structures or patterns can be related to topological features. For example, in the research of structures in chemistry and biology or in the study of convection in fluid dynamics. In those cases, their persistence diagrams are on their own enough to interpret and understand important properties of the phenomena from which the data has been generated.

On the other hand, in general it is necessary further processing in order to interpret the topological information encoded in persistence diagrams. Nevertheless, the space of persistence diagrams is not a linear space. That is, there is no simple way to define the sum of two diagrams, or the multiplication of a diagram by a real number, such that it is compatible with the bottleneck distance. This represents a major drawback and could endanger the use of persistence diagrams in practical applications: many statistical descriptors and machine learning techniques need the input to be elements of a finite-dimensional vector space.

An almost immediate way to solve this problem is to transform persistence diagrams into vectors, with which we can perform linear tasks. This can be done by embeding the space of persistence diagrams into a linear space using vectorizations. Definition 5.0.1. A vectorization is a map Φ : D → B from the space of persistence diagrams to some Banach space B.

This chapter is dedicated to introduce the principal vectorizations used in topological data analysis. The main references are [START_REF] Bubenik | Statistical Topological Data Analysis using Persistence Landscapes[END_REF] and [START_REF] Lacombe | Statistics for Topological Descriptors using optimal transport[END_REF].

In general, what interest us is that the properties encoded in persistence diagrams are transferred in some way to the vectorizations, and can be used to study the data set. Moreover, stability with respect to input noise and efficiency in computation are also important. However, this is not always possible. To begin with, the choice of the vectorization is arbitrary. Secondly, for the moment it is not known whether, in general, close diagrams have close representations and vice-versa. Lastly, the interpretability we had with persistence diagrams is lost when using vectorizations. For example, once the vectorization is applied we can define a mean m. Nervertheless, a priori m has nothing to do with a notion of mean in D, it may not even be the image of a persistence diagram.

Persistence landscapes

Since the aim of vectorizations is to be able to use numerical techniques, we restrict ourselves to the practical case of finite persistence diagrams. Hence, let µ = n i=1 δ x i ∈ D. The persistence landscape is defined as follows (see figure 5.1). Firstly, consider the change of coordinates

h : R 2 → R 2 ; h(r 1 , r 2 ) = r 1 + r 2 2 , r 2 -r 1 2 .
(5.1)

The outcome of applying h is the rotated and rescaled persistence diagram h(X) located in {(r 1 , r 2 ) ∈ R 2 : r 2 ≥ 0}. The diagonal ∂Ω is sent by h to the r 1 -axis.

After that, for each x i we tent the point h(x i ) by applying the triangle function, which is given by

Λ r : R → R; Λ r (t) = max{0, r 2 -|t -r 1 |}, (5.2)
obtaining a family of continuous functions {Λ h(x i ) } n i=1 . Finally, the persistence landscape is defined as

λ µ : N × R → R; λ µ (k, t) = kmax i=1,...,n Λ h(x i ) (t),
where kmax is the k-th largest value in the set. That is, λ µ is a summary of the arrangement of the piecewise linear curves that are obtained when overlaying the graphs of the functions {Λ h(x i ) } n i=1 . For each k ∈ N the function λ µ (k, •) : R → R is called k-th landscape of µ.

Remark 5.1.1. For any t ∈ R and k ∈ N, λ µ (k, t) ≥ 0 and λ µ (k, t) ≥ λ µ (k + 1, t). Moreover, from the fact that Λ P is 1-Lipschitz and the definition of landscape, it is easy to deduce that k-th landscapes are 1-Lipschitz too. ♦ Notice that there exists k 0 ∈ N such that, for any k ≤ k 0 , the k-th landscape is zero. Hence, persistence landscapes are elements of the Banach space L p (N × R), with the counting measure on N and the Lebesgue measure on R. We can then define the vectorization µ → λ µ , which in fact is injective. As a consequence, the representation of persistence diagrams through landscapes does not imply loss of information. Another advantage of persistence landscapes is that they are easily invertible. Moreover, they share similar stability properties with persistence diagrams.

Proposition 5.1.2. Let X and Y be two finite compact sets. Let λ X and λ Y be the persitence landscapes associated to the Vietoris-Rips or Čech filtrations. For any t ∈ R and any k ∈ N, we have

|λ X (k, t) -λ Y (k, t)| ≤ d ∞ (dgm(X), dgm(Y)).
For the proof of this proposition we refer to theorem 5.2 of [START_REF] Bubenik | Statistical Topological Data Analysis using Persistence Landscapes[END_REF] On the other hand, landscapes highlight points far from the diagonal, which represent persistent features of the data. This implies that secondary and tertiary features are not given as much importance. However, they are usually useful when discriminating between data sets.

Linear representations

In this subsection we will focus on a particular case of vectorizations that are defined as integrals of certain functions. Indeed, they do not rely on the fact that the measure must be a persistence diagram, so we will work on the metric space (M p , OT p ), with 1 ≤ p < ∞. Typically B = R m . One of the reasons why this type of vectorizations are interesting is because they are simple to define and compute. For instance, in the practical case of finite persistence diagrams, they transform into a sum Φ ( n i=1 δ

x i ) = n i=1 f (x i )
, where f sends each point of the persistence diagram to an element of the Banach space. Moreover, they include many vectorization methods of topological data analysis, as we will see.

Thanks to how Φ is defined, the study of its continuity is directly related with the vague topology on M p , and consequently with optimal transport distance. Therefore, chapter 4 may be used to characterize the continuity of these linear representations in terms of the function f , as proposition below shows. The map Proof. Let f ∈ C 0 b,p and consider the measures µ, µ 1 , µ 2 , . . . ∈ M p such that OT p (µ n , µ) tends to zero. To prove continuity of Φ we have to check that lim n→∞ Φ(µ n ) = Φ(µ). Thanks to theorem 2 of [START_REF] Nielsen | Weak convergence and banach sapce-valued functions:improving the stability theory of feynman's operational calculi[END_REF], it is enough to study the case where B = R. Corollary 4.3.13 implies that convergence in optimal transport distance is equivalent to weak convergence of the measures µ

d : Ω × Ω → [0, ∞) denotes the metric || • || q , with 1 ≤ q ≤ ∞.
[p] n w -→ µ [p] . By assumption, f (x) d(x,∂Ω) p is bounded in Ω, so thanks to the characterization of weak convergence (B.1),

Ω f (x) d(x, ∂Ω) p dµ [p] n (x) → Ω f (x) d(x, ∂Ω) p dµ [p] (x).

Notice that µ

[p] n µ n and µ [p] µ. Applying Radon-Nikodym theorem B.0.13 the limit above transforms to,

Φ(µ n ) = Ω f (x)dµ n (x) = Ω f (x) 1 d(x, ∂Ω) p dµ [p] n -→ Ω f (x) 1 d(x, ∂Ω) p dµ [p] (x) = Ω f (x)dµ(x) = Φ(µ),
as wanted.

For the other implication we proceed by contradiction. Suppose first that f : Ω → B is not continuous at some x ∈ Ω. Then, there exists a sequence of points

{x n } n ⊂ Ω such that x n → x but f (x n ) does not converge to f (x). Consider now the measures µ n = δ xn and µ = δ x , both in M p . It is clear, by theorem 4.3.11, that lim n→∞ OT p (µ n , µ) = 0. However, Φ(µ n ) = f (x n ) does not converge to Φ(µ) = f (x).
That is, Φ is not continuous for the optimal transport distance. On the other hand, assume f is continuous but x → f (x) d(x,∂Ω) p is not bounded. This implies that we can find a sequence {x n } n ⊂ Ω such that

lim n→∞ f (x n ) d(x n , ∂Ω) p = ∞.
Consider the persistence measures µ n = 1 ||f (xn)|| δ xn . Notice that the above limit implies

lim n→∞ OT p p (µ n , 0) = lim n→∞ Pers p (µ n ) = lim n→∞ 1 ||f (x n )|| d(x n , ∂Ω) p = 0.
Therefore, in order to be Φ continuous it should satisty Φ

(µ n ) → Φ(0) = 0. But Φ(µ n ) = f (xn) ||f (xn)||
, which has norm equal to one for every n ∈ N. Remark 5.2.3. Note that proposition 5.2.2 not only provides a method to built continuous linear representations, but asserts that it is the only way to do so. It consists in constructing the functions f : Ω → B as follows. Firstly, a function φ on Ω with enough good characteristics is considered. Then, this function is weighted with respect to the distance to the diagonal d(x, ∂Ω) p , obtaining f (x) = φ(x)d(x, ∂Ω) p . Examples below exhibit that this produces relevant vectorization methods. ♦

Apart from continuity, we would like, as we have said, that this linear representations satisfies some kind of stability,

||Φ(µ) -Φ(ν)|| ≤ C • OT p (µ, ν),
for some constant C. Fortunately, that is the case for p = 1.

Proposition 5.2.4 ([6]

). Let T ⊂ R and consider a family (f t ) t∈T such that each f t : Ω → R is a Lipschitz continuous function with Lipschitz constant less than one and satisfying f t (∂Ω) = 0. Then, the linear representation

Φ : M 1 → R T ; Φ(µ) = (ϕ ft (µ)) t∈T = Ω f t (x)dµ(x) t∈T satisfies for all µ, ν ∈ M 1 ||Φ(µ) -Φ(ν)|| ∞ := sup t∈T |ϕ ft (µ) -ϕ ft (ν)| ≤ OT 1 (µ, ν).
Proof. Let µ, ν ∈ M 1 and consider and optimal transport plan π ∈ Opt(µ, ν). For any t ∈ T , since f t is zero on the boundary and using the marginal constraints of π,

|ϕ ft (µ) -ϕ ft (ν)| = Ω f t (x)dµ(x) - Ω f t (y)dν(y) = Ω f t (x)dµ(x) - Ω f t (y)dν(y) = Ω× Ω f t (x)dπ(x, y) - Ω× Ω f t (y)dπ(x, y) = Ω× Ω(f t (x) -f t (y))dπ(x, y). Since f t has Lipschitz constant less than one Ω× Ω(f t (x) -f t (y))dπ(x, y) ≤ Ω× Ω d(x, y)dπ(x, y) = OT 1 (µ, ν). All in all, |ϕ ft (µ) -ϕ ft (ν)| ≤ OT 1 (µ, ν) for every t ∈ T , which implies ||Φ(µ) -Φ(ν)|| ∞ ≤ OT 1 (µ, ν).
Finally, we present some examples of continuous linear representations that are used in topological data analysis (figure 5.2). As before, these definitions do not rely on the fact that we are working with persistence diagrams, and actually are well-defined for any persistence measure in M p .

Persistence surfaces For this linear representation a non-negative Lipschitz continuous bounded function K : R 4 → R is chosen. For example,

K(x, y) = exp - ||x -y|| 2 2 . The map f : Ω → C b (R 2 ) is defined as f (x) = d(x, ∂Ω) p K(x, •), so f (x) : R 2 → R.
Hence, the persistence surface is

Φ(µ) = Ω f (x)dµ(x) = Ω d(x, ∂Ω) p K(x, •)dµ(x),
which sends each persistence diagram to an element of the space of continuous bounded functions (C b (R 2 ), || • || ∞ ). Obviously, K being bounded and f (x) being proportional to d(x, ∂Ω) p implies that x → ||f (x)||∞ d(x,∂Ω) p is bounded. Thus, Φ is continuous. In particular, for a finite persistence diagram we obtain

Φ n i=1 δ x i = n i=1 f (x i ) = n i=1 d(x i , ∂Ω) p K(x i , •).
Persistence silhouettes In this case consider the function

Λ : Ω × R → R; Λ(x, t) = Λ h(x) (t),
where h and Λ r are given by (5.1) and (5.2) respectively. Notice that, for a fixed

x = (x 1 , x 2 ) ∈ Ω, the map Λ(x, •) : R → R is bounded. Take f : Ω → C b (R) as f (x) = d(x, ∂Ω) p-1 Λ(x, •). Then, the persistence silhouette Φ(µ) = Ω f (x)dµ(x) = Ω d(x, ∂Ω) p-1 Λ(x, •)dµ(x), takes values in the space (C b (R), || • || ∞ ). Notice that the maximum value of Λ(x, •) is x 2 -x 1 2 ,
δ x i = n i=1 f (x i ) = n i=1 d(x i , ∂Ω) p-1 Λ(x i , •).
Weighted Betti curves The construction of the weighted Betti curves is similar to the previous ones. Let p, p ≥ 1 and for each t ∈ R consider the rectangle

R t = (-∞, t] × [t, +∞). Define the function f : Ω → L p (R) as x → f (x) : t → d(x, ∂Ω) p-1 p 1 Rt (x) ,
where 1 Rt (x) = 1 if x ∈ R t and zero otherwise. Observe that, for a given x = (x 1 , x 2 ) ∈ Ω, the function f (x)(t) is nonzero if and only if t ∈ [x 1 , x 2 ]. The linear representation is then given by

Φ(µ)(t) = Ω f (x)(t)dµ(x) = Ω d(x, ∂Ω) p-1 p 1 Rt (x)dµ(x), with Φ(µ) ∈ (L p (R), || • || p ). It is easy to see that ||f (x)|| p is proportional to d(x, ∂Ω) p . Indeed, ||f (x)|| p p = R |f (x)(t)| p dt = [x 1 ,x 2 ] (f (x)(t)) p dt = [x 1 ,x 2 ] d(x, ∂Ω) p-1 p p dt = [x 1 ,x 2 ] d(x, ∂Ω) pp -1 dt = d(x, ∂Ω) pp -1 (x 2 -x 1 ).
As noticed before, d(x, ∂Ω) is proportional to x 2x 1 . Consequently, we conclude that ||f (x)|| p p is proportional to d(x, ∂Ω) pp . By proposition 5.2.2, Φ is continuous. When p = 1 = p is chosen, this representation is called Betti curve and, in the finite case, is given by a sum of step functions

Φ n i=1 δ x i = n i=1 f (x i )(t) = n i=1 1 Rt (x i ).
For each t ∈ R the sum is equal to the number of points x i of the persistence diagram that lie in R t = (-∞, t] × [t, +∞). If the persistence diagram comes from the n-th homology groups of a filtration (X t ) t∈R , that is equal to the Betti number of X t . formation, defined as

φ Λ (x) = [Λ x (t 1 ), Λ x (t 2 ), • • • , Λ x (t m )] T ,
where t 1 , • • • , t m ∈ R and Λ x (•) is defined by equation (5.2). The Gaussian point transformation is given by

φ Γ (x) = [Γ(x, y 1 ), Γ(x, y 2 ), • • • , Γ(x, y m )] T ,
where y i ∈ R 2 for 1 ≤ i ≤ m and, for a given σ > 0, the map Γ(x,

•) : R → R is Γ(x, y) = exp - ||x -y|| 2 2 2σ 2 , ( 5.4)

♦

The generality of the formalism given by (5.3) lets us recover standard vectorization methods.

• Take as point transformation the triangle one with m = 1 composed with the change of coordinates h : R 2 → R 2 given in (5.1), i.e. φ Λ • h. As weight function let w = 1 and op = kmax. Then, Φ(µ) gives the k-th landscape evaluated at t ∈ R.

• Consider again the composition φ Λ • h, together with op = sum and an arbitrary weight function w. Then, Φ(µ) is equivalent to evaluate the persistence silhouette, weighted by w, on t 1 , • • • , t m ∈ R.

• In this case, consider the Gaussian point transformation φ Γ , op = sum and an arbitrary w. Then, Φ(µ) provides the evaluation of the persistence surface, weighted by w, on y 1 , • • • , y m ∈ R 2 and being K(x, •) = Γ(x, •).

Remark 5.3.3. When transforming a persistence diagram into a vector, the weight function w : R 2 → R let us hightlight certain points or areas of the diagram that are useful to achieve a given task. In the case of linear representations, w(x) was a power of d(x, ∂Ω), which is greater when the point x ∈ Ω is far from the diagonal, i.e. it represents a feature that persists more. Hence, those features are weighted more than the ones who last little in time, and which are represented by points close to the diagonal in the persistence diagram. Although this provides continuity of the representation, depending on the setup it may be better to underline other properties by choosing different w. The formulation presented in this section let the user choose the weight function that suits him best. ♦

A general drawback of this freedom of choice is that, since the function f has to be fixed in advance, it might not be optimal to perform a given task. Regarding this problem, the success of deep neural networks has shown that learning representations is a strong recommended approach. Actually, the formulation given by (5.3) can be used to optimize f (x) = w(x)φ(x), constructing a learnable vectorization. In order to do this we parametrized the weight w = w θ 1 and point φ = φ θ 2 functions, where (θ 1 , θ 2 ) ∈ R D . The idea is that the expression of Φ(µ) could be used as a generic neural network layer for persistence diagrams and then the parameters could be learned during a training phase. In practice, this is done by back-propagation, assuming that we know and can implement the gradients of θ 1 → w θ 1 and θ 2 → φ θ 2 . A network architecture is illustrated in [START_REF] Lacombe | Statistics for Topological Descriptors using optimal transport[END_REF]. Besides, approaches towards learning task-optimal stable representations of persistence diagrams have been studied and developed, e.g. [START_REF] Hofer | Deep learning with topological signatures[END_REF].

Linearized optimal transport

In the classical transport problem setting, linearized optimal transport provides a method to embed measures into a vector space. The latter consists in the following. Consider the Kantorovich formulation (4.5) for two probability measures ρ, µ in R 2 with finite second moment and cost function c(x, y) = ||x -y|| 2 . By theorem 4.3.1, whether ρ is absolutely continuous with respect to the Lebesgue measure, the optimal thansport plan is unique and induced by a transport map π = (id, T µ )#ρ, where T µ = ∇φ for a convex function φ. If we fix ρ, it is possible to define a vectorization as µ → T µ ∈ L 2 (ρ, R 2 ). Injectivity is clear because in this case T µ #ρ = µ, being T µ the unique optimal transport map between ρ and µ. Besides, stability results of this vectorization with respect to the Wasserstein distance (4.6) and the L 2 (ρ) norm have been proven in [START_REF] Mérigot | Quantitative Stability of Optimal Transport Maps and Linearization of the 2-Wasserstein Space[END_REF] and [START_REF] Delalande | Quantitative stability of optimal transport maps under variations of the target measure[END_REF].

In this section we mimic this idea using a similar result stated in [START_REF] Figalli | A new transportation distance between nonnegative measures, with applications to gradients flows with dirichlet boundary conditions[END_REF], which connects optimal admissible transport plans and transport maps. The advantage of this formulation, as we have seen, is that it can be used with measures that have different, or even infinite, mass as long as they have finite total persistence. As it has been done before, we focus on the practical case of finite persistence diagrams, which are represented as finite point measures on Ω. Following remark 4.3.6, we can assume them to be supported on a bounded subset Y of Ω and then apply directly what has been proved in [START_REF] Figalli | A new transportation distance between nonnegative measures, with applications to gradients flows with dirichlet boundary conditions[END_REF].

In particular, the result that concerns us in this section is corollary 2.5 of [START_REF] Figalli | A new transportation distance between nonnegative measures, with applications to gradients flows with dirichlet boundary conditions[END_REF]. We state the general result. Proposition 5.4.1 (Uniqueness of optimal plans). Consider X a bounded open set of R 2 with the euclidean distance d. Let ρ, µ ∈ M 2 (X ) and fix γ ∈ Opt(ρ, µ).

1. If ρ is absolutely continuous with respect to the Lebesgue measure, then γ| X × X is unique, and it is given by (id, T )#ρ, where T : X → X is the gradient of a convex function. However, γ as a whole may be not uniquely defined since there might be multiple ways of bringing the mass from the boundary to µ if no hypothesis on µ are made.

2. If moreover µ is absolutely continuous with respect to the Lebesgue measure, then γ is unique.

The proof follows exactly as in the classical transport problem due to the equivalence (i) ⇔ (iii) of proposition 2.3 in [START_REF] Figalli | A new transportation distance between nonnegative measures, with applications to gradients flows with dirichlet boundary conditions[END_REF]. The uniqueness of the first case only over X × X comes from the fact that p 1 #γ = ρ only on X .

Since we want to apply this to persistence diagrams, assume from now on that ν is a finite point measure. By fixing ρ ∈ M 2 (X ) satisfying 1, it is possible to associate to each ν the map T ν coming from γ ν | X × X = (id, T ν )#ρ.

Remark 5.4.2. Observe that, in spite of the fact that for two different measures ν = ν optimal transport plans γ ν ∈ Opt(ρ, ν) and γ ν ∈ Opt(ρ, ν ) are also distinct, a priori, the proposition does not assure us that T ν and T ν are not equal. That is, in general it may happen that γ ν and γ ν bring in the same way the mass from X to X , but differ on how they bring the mass from the boundary. In order to obtain injectivity for the map ν → T ν , let us study if this holds for some choice of ρ. Suppose ν = ν but T ν = T ν . Then, for any x ∈ X , γ ν (X × {x}) = γ ν (X × {x}). Recall that γ ν ( X × {x}) = ν(x) and the same equality holds for γ ν and ν . Since ν and ν does not have the same support, this implies the existence of a point x ∈ spt(ν) (or ν ) but x ∈ spt(ν ) (or ν) such that the optimal transport plan γ ν does not bring mass from X to x, i.e. γ ν (X × {x}) = 0 and γ ν ( X × {x}) = γ(∂X × {x}) = 1. As a result, to have injectivity it is sufficient to choose ρ such that for any ν = n i=1 δ x i the optimal transport plan satisfies γ ν (X × {x i }) = 0 for all i = 1, . . . , n. If this happens, T ν = T ν implies ν = ν . ♦ Henceforth ρ is fixed as the uniform measure. Similar to the classical optimal transport problem, it can be proven that T ν ∈ L 2 (ρ, X ). Indeed, for any y ∈ X , using Minkowski inequality The space X × X ⊂ R 4 is bounded and γ ν (X × X ) = ρ(X ) = 1. As a consequence, the initial integral is finite and T ν ∈ L 2 (ρ, X ). In conclusion, we propose the following definition. Chapter 6

Numerical results

Finally, we include results on real data in order to show computations of the different notions of TDA we have introduced (Rips complexes, persistence barcodes, diagrams, etc.) and to exemplify the use of vectorizations when performing linear tasks. In particular, we implement PCA. In the following, we present a summary of what can be found in this Python Jupyter Notebook.

The data set used for these computations can be found in GUDHI TDA tutorial. It has been obtained from the walk of 3 persons A, B and C. The walk has been recorded using the accelerometer sensor of a smartphone in their pocket, giving rise to 3 time series, each of them representing the 3 coordinates of the acceleration of the corresponding walker in a coordinate system attached to the sensor. Each series has been splitted in a list of 100 times series made of 200 consecutive coordinate points.

We compute a Rips complex for each time series, obtaining 100 complexes per walker. As maximum radius we choose r = 0.2, not considering simplexes of dimension greater than 3. In particular, this means that all n-th homology groups with n > 3 are zero. Then, from those Rips complexes, we compute the persistence barcode and persistence diagram. In total, we obtain 300 persistence diagrams, each of them corresponding to a splitted series of one of the walkers. As we have seen, it is possible to transform each of these persistence diagrams into a vector. In this case, we obtain the first five landscapes and the Betti curve of each diagram. The former corresponds to a vector in R 5000 , whereas the latter is a vector in R 1000 . In figure 5.2 we represent the first three landscapes, the Betti curve and the persistence silhouette associated to the first time series of walker A. That is, they are the vectorizations of the persistence diagram of figure 2.3.

Due to the high dimensionality of this vectorizations, we execute principal component analysis to reduce their dimension and visualize them. After doing this, we observe whether the three walkers can be differentiated from the information encoded in the landscapes or the Betti curves. It seems that Betti curves perform better for this task and that, in both cases, walker C stands out above the other two, which are more intermingled. with sets X n of n-simplixes σ n , which are (n + 1)-element subsets of V . The only requirement is that, each (k + 1)-element subset of the vertices of an n-simplex σ n in X n , is a k-simplex in X k . From this combinatorial data, and once we have chosen a partial ordering of the vertices V , K can be constructed. This ordering restricts to a linear ordering on the vertices of each simplex in X n . ♦

The dimension of a simplicial complex K is given by dim K = sup{n : ∃σ ∈ K, σ is a n-simplex}.

Definition A.1.5. Given a finite geometric simplicial complex K, we can associate to it a topological space

|K| = σ∈K σ ⊂ R d ,
which inherits the topology of R d .

Note that this topological space is compact. The notion of geometric simplicial complex can be generalized. By doing this we obtain objects which are purely combinatorial structures and do not need to be embedded in any Euclidean space, although it is possible if needed. Definition A.1.6. Given a set V , an abstract simplicial complex with vertex set V is a family K of finite nonempty subsets σ of V satisfying:

1. the elements of V belongs to K; 2. if σ ∈ K, then any subset of σ also belongs to K. These finite subsets σ of V are called abstract simplexes.

In practice, since we are working with data sets which are finite, we will only have to deal with finite abstract simplicial complexes.

The dimension of an abstract simplex is its cardinality minus one. The dimension of an abstract simplicial complex is dim K = sup{dim σ : σ ∈ K}.

Remark A.1.7. Observe that any geometric simplicial complex is an abstract simplicial complex by its combinatorial description. ♦

As we anticipated, to any finite abstract simplicial complex K it is possible to associate a topological space | K| as a subset of R d , where d = dim K, as follows. We identify each v i ∈ V = {v 0 , . . . , v n } with some x i ∈ R d such that {x 0 , . . . , x n } ⊂ R d are affine independent. Then, abstract simplexes σ = {v i 0 , . . . , v i k } are identified with the corresponding simplexes of R d , [x i 0 , . . . , x i k ]. The topological space is the union of all them.

Notice that, if K is a geometric complex whose combinatorial description is the same as K, then |K| is homeomorphic to | K|. In this case K is called geometric realization of K. Isomorphic abstract simplicial complexes have homeomorphic geometric realizations. Thus, we will drop the adjective abstract/geometric from now on and only write simplicial complex.

Example A.1.8 (Nerve complex). Given a topological space X and U = {U i } i∈I an open cover, an important example of abstract simplicial complex is the nerve of U, denoted by N (U). The set of vertices is V = U and σ = {U i 1 , . . . , U i l } ∈ N (U) if and only if

U i 1 ∩ • • • ∩ U i l = ∅. ♦ A.

Simplicial homology

Homology identifies topological features on a given simplicial complex K: connected components, loops, cavities, etc. This is done by developing an algebraic structure on K that encodes this topological information. In order to do it we need to define an orientation on the simplicial complex.

Definition A.2.1. A simplicial complex K is oriented if there is a partial order on the set of vertices of K, whose restriction to the vertices of any simplex is a linear order.

On an oriented simplicial complex K we define the following equivalence relation between simplexes {p 0 , . . . , p n } ∈ K:

1. {p 0 , . . . , p n } = 0 if some vertex is repeated, 2. {p 0 , . . . , p n } = sgn(π){p π0 , . . . , p πn } where π is a permutation of {0, 1, . . . , n}.

We will denote each class by [p 0 , . . . , p n ], where {p 0 , . . . , p n } is the element of the class such that p 0 < p 1 < • • • < p n . Let k be a field. Definition A.2.2. If K is an oriented simplicial complex, we define the space of n-chains C n (K) with coefficients in k as the set whose elements are the formal (finite) sums of n-simpleces σ = [p 0 , . . . , p n ] of K. That is, any n-chain can be written as c = k i=1 n i σ i , where σ i are n-simplexes and n i ∈ k.

Notice that C n (K) = 0 for n > dim K. A sum and a product can be defined on C n (K), making it a k-vector space. It can be proven that, whether K is an oriented simplicial complex of dimension m, the following is a chain complex, i.e. ∂ • ∂ = 0,

0 → C m (K) ∂ - → • • • ∂ - → C 1 (K) ∂ - → C 0 (K) → 0.
Consider Z n (K) := ker ∂ n , which is the group of simplicial n-cycles, and B n (K) := im∂ n+1 , the group of simplicial n-boundaries. Then, the following is well-defined

H n (K) = Z n (K) B n (K) = ker ∂ n im∂ n+1 ,
and it is called n-th simplicial homology group. Notice that only finitely many homology groups are nonzero and that any of them is a finite dimensional k-vector space (since C n (K) are finitely generated). The dimension of this vector space is called n-th Betti number of K,

β n (K) = dim H n (K).
Homology theory can be extended to more general spaces. Namely, given X topological space, we can consider the continuous map σ : [p 0 , . . . , p n ] → X, where [p 0 , . . . , p n ] is a geometric realization of a oriented n-simplex. It is called singular simplex of dimension n. As before, it is possible to define the space of n-chains as the free abelian group generated by the singular simpleces of X. Therefore, the notions of boundary operator, cycles, boundaries and homology groups extend straightforward. In this case, H n (X) is called singular homology group.

Given any topological spaces X and Y , a continuous map f : X → Y induces a homomorphism between homology groups

H n (f ) : H n (X) → H n (Y ); H n (f )([σ]) = [f • σ].
This map f : X → Y is a homotopy equivalence if there exists another continuous map g : Y → X such that f • g is homotopic to id Y and g • f is homotopic to id X . In that case we say that X and Y are homotopy equivalent. It can be proven that any homotopy equivalence induces an isomorphism H n (f ) between singular homology groups.

Theorem A. 2.4 ([31]). Let K be an (oriented finite) simplicial complex. Then, the simplicial homology group H n (K) is isomorphic to the singular homology group H n (|K|). This implies that H n (K) is independent of the orientation defined on K. In addition, it let us talk indifferently about simplicial or singular homology.

Figure 1 . 1 :

 11 Figure 1.1: Čech complex Čech α (X) (left) and Rips complex Rips 2α (X)(right) .

  f

Figure 1 . 2 :

 12 Figure 1.2: The mapper algorithm on a point cloud.

  α

Figure 1 . 3 :

 13 Figure 1.3: Sequence of Čech complexes with increasing radius α.

  ) whenever b < d. Usually, b * means b + or b -. Using this, a general decomposable persistence module is represented as l∈L k(b * l , d * l ).

Figure 2 . 2 :

 22 Figure 2.2: Example of persistence barcodes associated to the Rips filtration (Rips α (X)) α∈[0,α ] of a data set of points X (left) at different scales: α = 1, 1.2, 2. The red intervals correspond to the zero homology, while the blue ones correspond to the first homology. The x-coordinate indicates the length of the interval.

Figure 2 . 3 :

 23 Figure 2.3: Example of persistence diagram. Red points correspond to the zero homology groups, blue to the first homology groups and the green one to the second homology group.

Figure 2 . 4 :

 24 Figure 2.4: On the left, a loop X in the plane for which we consider the projection onto the y-coordinate. On the right, the decorated persistence diagram and barcode for the sublevel set filtration of X. The points and intervals corresponding to the zero homology groups are in red. The ones of the first homology group, in blue.

Figure 3 . 1 :

 31 Figure 3.1: Vertical and horizontal splitting of a rectangle.

Figure 3 . 2 :

 32 Figure 3.2: Different decorated points in a rectangle.

(3. 5 )

 5 Theorem 3.1.4 extends too. Corollary 3.1.7 ([4]

Definition 3 . 2 . 1 .

 321 Given S a subset of R 2 , define Rect(S) = {[a, b] × [c, d] ⊂ S : a < b & c < d}. Definition 3.2.2. A rectangle measure or r-measure on S is a function µ : Rect(S) → {0, 1, 2, . . .} ∪ {∞} which is additive under vertical and horizontal splitting, as in (3.2).

Definition 3 . 2 . 5 .

 325 Let µ be a finite rectangle measure on a region S ⊆ R 2 . The decorated diagram of µ is the unique locally finite multiset Dgm(µ) in S × such that µ(R) = card(Dgm(µ)| R ), for every R ∈ Rect(S). The undecorated diagram of µ is the corresponding locally finite multiset in S • dgm(µ) = {(b, d) : (b * , d * ) ∈ Dgm(µ)} ∩ S • .

Remark 4 . 1 . 5 .

 415 Although in the standard definition of the bottleneck distance || • || ∞ is used, any norm || • || q may be used instead, where 1 ≤ q ≤ ∞. Due to the equivalence of norms in R 2 , this change has almost no consequences on the results.♦

Theorem 4 . 1 . 9 (

 419 [START_REF] Chazal | Gromov-hausdorff stable signatures for shapes using persistence[END_REF]). Let (X, d X ) and (Y, d Y ) be two finite metric spaces. Then, for any n ∈ N,d ∞ (dgm n (X), dgm n (Y)) ≤ 2d GH (X, Y),where d GH is the Gromov-Hausdorff distance and dgm n (X), dgm n (Y) are the persistence diagrams of the Vietoris-Rips or Čech filtrations. Definition 4.1.10. The Gromov-Hausdorff distance between two compact metric spaces (M 1 , d 1 ), (M 2 , d 2 ) is

  where γ(x) is the point of dgm n (g) paired with x. Denote ε = ||f -g|| ∞ . Applying theorem 4.1.8 we obtain max x∈dgm n (f ) ||xγ(x)|| ∞ ≤ ε. Therefore, for every x ∈ dgm n (f ) we have that ||xγ(x)|| ∞ ≤ ε. (4.3)

Definition 4 . 2 . 2 .

 422 The space of persistence diagrams of parameter p is defined byD p = {µ ∈ D : Pers p (µ) < ∞},where 1 ≤ p ≤ ∞. The total persistence of µ of parameter p, Pers p (µ), is defined as in definition 4.1.12.

Definition 4 . 3 . 2 .

 432 Given µ ∈ M(Ω) the total persistence of parameter p is defined asPers p (µ) = Ω d(x, ∂Ω) p dµ(x), if 1 ≤ p < ∞,and 1 Pers ∞ (µ) = sup x∈spt(µ) d(x, ∂Ω), if p = ∞. Remark 4.3.3. Let µ be a Borel measure on Ω satisfying Pers p (µ) < ∞, where 1 ≤ p < ∞. Then, for any Borel set A ⊂ Ω such that d(A, ∂Ω) := inf x∈A d(x, ∂Ω) > 0, we have

being 1 A

 1 the characteristic function for A ⊂ E Ω . Therefore, Portmanteau theorem B.0.11 implies π n v -→ π . Note that E Ω is open so, applying again theorem B.0.11, the following holds lim inf n→∞

  and this is true for any admissible plan. Consequently, fixing p ∈ [1, +∞), OT p p (µ, 0) = inf π∈Adm(µ,0) Ω× Ω d(x, y) p dπ(x, y) = inf π∈Adm(µ,0) Ω×∂Ω d(x, y) p dπ(x, y).

(

  x,y)∈spt(π 12 ) d(x, y) + sup (y,z)∈spt(π 23 ) d(y, z)

Finally

  , since S ⊂ S we conclude that OT ∞ (a, b) = d ∞ (a, b).

Theorem 4 . 3 . 11 .

 4311 Let {µ n } n∈N be a sequence of measures in M p and µ ∈ M p , where 1 ≤ p < ∞. Then, lim n→∞ OT p (µ n , µ) = 0 if and only if µ n v -→ µ and lim n→∞ Pers p (µ n ) = Pers p (µ).

  Likewise,-OT p (µ n , µ) ≤ OT p (µ n , 0) -OT p (µ, 0). Therefore, 0 ≤ |OT p (µ n , 0) -OT p (µ, 0)| ≤ OT p (µ n , µ) → 0, which implies lim n→∞ OT p (µ n , 0) = OT p (µ, 0). By lemma 4.3.8 we conclude that lim n→∞ Pers p (µ n ) = Pers p (µ).

Figure 5 . 1 :

 51 Figure 5.1: Construction of the persistence landscape (right) from a finite persistence diagram (left). The first landscape is in blue and the second one is in red. All the other landscapes are zero.

Definition 5 . 2 . 1 .

 521 A linear representation is a vectorization Φ :M p → B of the form Φ(µ) = ϕ f (µ) = Ω f (x)dµ(x),for some fixed function f : Ω → B.

Proposition 5 . 2 . 2 (

 522 [START_REF] Lacombe | Statistics for Topological Descriptors using optimal transport[END_REF]). Consider a Banach space B and a function f : Ω → B. Let Φ : M p → B be the linear representation defined by Φ(µ) = Ω f (x)dµ(x). Then, it is continuous with respect to the optimal transport distance OT p and the norm || • || B if and only if f belongs to the class of functions C 0 b,p = f : Ω → B : f continuous and x → ||f (x)|| B d(x, ∂Ω) p bounded .

X d 2 2 ( 2 .

 222 (T ν (x), y)dρ(x) T ν (x), x)dρ(x)Because X is bounded and ρ is finite, the second integral is finite too. On the other hand,X d 2 (T ν (x), x)dρ(x) = X d 2 (x, T ν (x))dρ(x) = X d 2 (•, •) • (id, T ν )(x)dρ(x) = X × X d 2 (x, y)d((id, T ν )#ρ)(x, y) = X ×X d 2 (x, y)dγ ν (x, y).

Definition 5 . 4 . 3 .

 543 Consider finite point measures ν in M 2 (X ), where X ⊂ Ω is an open bounded subset of R 2 , and fix the uniform measure ρ on X . Then, we define a vectorizationν ∈ (M 2 (X ), OT 2 ) → T ν ∈ (L 2 (ρ, X ), || • || L 2 ),where T ν is given by proposition 5.4.1.Proposition 5.4.4. Given two finite point measures ν 1 , ν 2 ∈ M 2 (X ) consider the maps T 1 , T 2 from the above definition. Then,OT 2 2 (ν 1 , ν 2 ) ≤ ||T 1 -T 2 || 2 L 2 (ρ) + Pers 2 (ν 1 ) + Pers 2 (ν 2 ).

  Figure 2.3 shows the persistence diagram associated to the first time series of walker A, containing the first 200 acceleration coordinates.

Figure A. 1 :

 1 Figure A.1: Visualization of a simplicial complex and its simplices.

Definition A. 2 . 3 .

 23 The boundary operator∂ n : C n (K) → C n-1 (K) is defined by setting ∂ n ([p 0 , . . . , p n ]) = n i=0 (-1) i [p 0 , . . . , pi , . . . , p n ],and extending by linearity, where pi means to remove the vertex p i .

  2.2.4. A homomorphism φ between two persistence modules V and U over T is a natural transformation between functors. That is, a collection of linear maps (φ t ) t∈T where φ t : U t → V t and such that φ t • u s t = v s t • φ s for all s ≤ t.

	U s	u s t	U t
	φs		φt	(2.1)
	V s	v s t	V t
	Remark 2.2.5. Thanks to the above definition we can consider the category of
	persistence modules, which is actually an abelian category.	♦
	Example 2.2.6. Let X ⊂ (R m , || • || q

  When T is a finite set {t 0 < t 1 < • • • < t n } intervals over T are normally written as J = [t i , t j ]. Hence, k J is usually denoted by k[t i , t j ]. It can be visualized as the sequence

	Remark 2.2.9.
	otherwise,	i s t =	id k s, t ∈ J, 0 otherwise.

  2 . For each rectangle R contained in S of finite measure, theorem 3.2.4 can be applied. This provides a multiset in R × such that equation (3.8) holds. By the uniqueness from 3.2.4, multisets of rectangles that overlap should agree on the intersection. Note that the union of all the R × of finite measure is exactly F × (µ). As a result, we obtain a uniquely defined multiset in It transforms homeomorphically the extended half-plane into the rectangle [-π/2, π/2] 2 contained in R 2 . Notice that the statements of theorem 3.2.4 and of the first proven part are invariant under ϕ. Indeed, consider ϕ#µ defined as ϕ#µ

	F × (µ) satisfying (3.8) for any R ∈ Rect(S) whose µ-measure is finite. Applying lemma 3.2.8 we conclude the proof.
	Secondly, let S ⊂ R2 . Consider the embedding
	ϕ : R2 → R 2 ;	(x, y) = (arctan x, arctan y)

  open, we can apply Portmanteau theorem B.0.11 and obtain

  which is proportional to d(x, ∂Ω). Therefore, ||f (x)|| ∞ is proportional to d(x, ∂Ω) p . By proposition 5.2.2, Φ is continuous. In the case of finite persistence diagrams, this representation consists of a weighted sum of the different functions of the persistence landscape,

	n
	Φ
	i=1

A multiset is a set where points can be repeated.

An endomorphism f is idempotent if f • f = f .

A collection of subsets of a topological space X is said to be locally finite if each point in the space has a neighborhood that intersects only finitely many of the sets in the collection.

The support of a measure µ are the points x such that if U x is any open neighborhood of x, then µ(U x ) > 0.

Recall that L p (S) = L p (S)/ ∼, where f ∼ g if and only if ||f -g|| p = 0 and L p = {f : S → R : ||f || p < ∞} with 1 ≤ p ≤ ∞

Acknowledgements

Due to the previous theorem we can deduce that the topology of the optimal transport metric is stronger than the vague topology. In the case p = ∞ only one of the implications holds, whose proof is similar to the one above and can be found in proposition 3.26 of [START_REF] Lacombe | Statistics for Topological Descriptors using optimal transport[END_REF].

Theorem 4.3.12. Let µ, µ 1 , µ 2 , . . . ∈ M ∞ . If

Regarding weak convergence, we have the following.

Corollary 4. 3.13 ([6]). Consider the measures µ, µ 1 , µ 2 , . . . ∈ M p , with p < ∞. Then, lim n→∞ OT p (µ n , µ) = 0, if and only if µ

[p] n w -→ µ [p] , where these measures are defined for every Borel subset A ⊂ Ω as µ [p] (A) = A d(x, ∂Ω) p dµ(x).

Proof. Firstly, assume that OT p (µ n , µ) converges to zero. By theorem 4.3.11 this is equivalent to µ n v -→ µ and µ [p] n (Ω) = Pers p (µ n ) → Pers p (µ) = µ [p] (Ω).

By proposition B.0.6, it is enough to prove µ

[p] n v -→ µ [p] . Observe that µ

[p] n µ n and µ [p] µ. Besides, given any compactly supported continuous function f ∈ C c (Ω), the map x → d(x, ∂Ω) p f (x) is also continuous and compactly supported. Therefore, using vague convergence of µ n to µ and Radon-Nikodym theorem B.0.13,

which, by (B.2), is equivalent to vague convergence. Conversely, assume µ

[p] n w -→ µ [p] , which by proposition B.0.6 is equivalent to

Thanks to theorem 4.3.11, it suffices to prove that

d(x,∂Ω) p is continuous and compactly supported. Hence, µ

By (B.2) this is equivalent to vague convergence.

Point transformations

Let us recover a more applied point of view by letting B = R m and by considering only finite persistence diagrams, since those are the ones obtained from any practical setting. The building method presented in remark 5.2.3 can be generalized. As before, we begin with a function φ : R 2 → R m , which is called point transformation because it transforms each point of the persistence diagram to a vector in R m . Then, we weight this function, but instead of using the distance to the diagonal, we let the weight be any map w : R 2 → R, called weight function. If we considered the linear representation associated to this construction f (x) = w(x)φ(x), for any finite persistence diagram µ = n i=1 δ x i we would get a sum n i=1 w(x i )φ(x i ). However, more general operators may be used in order to construct the vectorization. Hence, let op be a permutation invariant operator, i.e. op(

for any µ = n i=1 δ x i finite persistence diagram.

Remark 5.3.1. Although the continuity provided by proposition 5.2.2 is lost in general, this setup has relevant properties regarding machine learning techniques, which will be underlined. ♦ Example 5.3.2. An example of point transformation is the triangle point trans-

It is an admissible plan between ν 1 and ν 2 . In fact, for every A ⊂ X ,

where the last equality follows from the fact that any optimal admissible transport plan can be assumed to satisfy γ| ∂X ×∂X = 0. Let us now study the last two integrals. Proposition 2.3 (ii) of [START_REF] Figalli | A new transportation distance between nonnegative measures, with applications to gradients flows with dirichlet boundary conditions[END_REF] states that optimality of γ i (for i = 1, 2) implies that they are concentrated on

Likewise,

Appendix A

Simplicial homology

In this chapter we review the bases of homology theory, which is needed to encode and study the topological features on topological data analysis. We focus on simplicial homology, since it is the one developed specially for simplicial complexes and used in applications. We refer to [START_REF] Hatcher | Algebraic Topology[END_REF] and [START_REF] Rotman | An Introduction to Algebraic Topology[END_REF] for more details.

A.1 Simplicial complexes

A simplicial complex is basically a generalization of a graph where, instead of connecting only pairs of points with edges, freedom is left to define higher n-dimensional structures connecting n-tuples "properly".

Definition A.1.1. Given a set {x 0 , . . . , x n } ⊂ R d of affine independent points, its convex hull is called n-simplex and is defined as

A face of σ is any simplex which can be built by a subset of {x 0 , . . . , x n }. The 0-simplexes [x i ] are called vertices.

1. If a simplex σ ∈ K, then all the faces of σ belong to K;

2. if some simplexes σ, s ∈ K, then σ ∩ s is empty or a common face of both.

In particular, all the vertices belong to K.

Definition A.1.3. Given T ⊂ K, it is a subsimplicial complex or subcomplex if T is a geometric simplicial complex and for every t ∈ T , t ∈ K.

Remark A.1.4. Notice that simplexes are fully characterized by its vertices. Each n simplex has n + 1 distinct vertices, and no other n simplex has this same set of vertices. Thus, K can be described combinatorially as a set V of vertices together Corollary A.2.5. Let K, K be two finite simplicial complexes such that |K| and |K | are homotopy equivalent. Then, H n (K) is isomorphic to H n (K ).

When studying simplicial complexes it could be useful to subdivide each simplex into small pieces, so that each of them is totally contained in some required space. A way of doing this, while preserving the topological properties, is the barycenter subdivision. After the subdivision we still have a simplicial complex, with more simpleces than the original but defining the same topological space, and hence having the same homology. Definition A.2.6. Let {p 0 , . . . , p n } be affine independent. Then, the barycenter of [p 0 , . . . , p n ] is 1 n+1 (p 0 + • • • + p n ) If {p 0 , . . . , p n } is affine independent with barycenter b then {b, p 0 , . . . pi , . . . , p n } is affine independent for each i. In the affine case R d , the computation of the barycenter subdivision can be done as we show below.

Definition A.2.7. Let σ n be an affine n-simplex. Its barycenter subdivision, denoted by Sd(σ n ), is a family of affine n-simplexes defined inductively on n ≥ 0 as follows:

1. Sd(σ 0 ) = σ 0 , i.e. is the identity on vertices; 2. if λ 0 , λ 1 , . . . , λ n+1 are the faces of dimension n of σ n+1 and b is the barycenter of σ n+1 , then Sd(σ n+1 ) cosists of all the (n + 1)-simplexes spanned by b and the n-simplexes in Sd(λ i ), for each i = 0, . . . , n + 1.

Notice that each n-simplex of Sd(σ n ) comes equipped with an orientation induced by the original ones. This construction can be applied successively, Sd m (σ n ). In the general case of a simplicial complex we can proceed as follows. For any simplex σ let b σ denote its barycenter Definition A.2.8. Given K a simplicial complex, the barycenter subdivision Sd(K) is defined to be the simplicial complex with Vert(Sd(K)) = {b σ : σ ∈ K} and with simplexes [b σ 0 , . . . , b σn ], where the σ i are simplexes in K with σ 0 < σ 1 . . . < σ n .

It can be proven that, for any simplicial complex, |K| = |Sd(K)|. Therefore, K and Sd(K) have isomorphic homology groups.

Appendix B

Measure theory

Consider X a locally compact Polish metric space, i.e. a separable, complete, metric space. Let us introduce some basic notions in measure theory, that will be used throughout the text. Definition B.0.1. A Radon measure µ supported on X is a Borel measure such that µ(K) is finite for every compact set K of X . Denote by M(X ) the space of all these measures.

The discrete case will be of special interest when studying persistence diagrams. Definition B.0.2. A point measure on X is a Radon measure with discrete support and integer mass on each point, i.e. of the form ν = x∈X n x δ x , where n x ∈ N and X ⊂ X is a locally finite 1 set. The space of all point measures on X is D(X ).

An important notion in measure theory, that is going to be exploit in the last chapters, is that of pushforward measure.

Definition B.0.3. Let X and Y be two measurable spaces and µ a measure on X . Consider f : X → Y a measurable map. Then, f #µ(A) = µ(f -1 (A)), for any measurable set A ⊂ Y, defines a measure f #µ on Y, called pushforward measure.

An important property of pushforwards is that a measurable map g on Y is integrable with respect to f #µ if and only if g • f is integrable with respect to µ. Moreover, it satisfies

The space of Radon measures may be equipped with the weak and the vague topology.

Definition B.0.4. The weak topology on M(X ) is the coarsest topology such that, for any f ∈ C b (X ) in the space of continuous and bounded functions, the following map is continuous

1 A collection of subsets of a topological space X is said to be locally finite if each point in the space has a neighborhood that intersects only finitely many of the sets in the collection.

Convergence in the weak topology will be denoted by µ n w -→ µ. Observe that it is equivalent to the convergence of ϕ f (µ n ) to ϕ f (µ) for all f ∈ C b (X ),

Definition B.0.5. The vague topology on M(X ) is the coarsest topology such that the maps

are continuous for every f ∈ C c (X ) continuous function with compact support in X .

We say that a sequence of measures {µ n } n∈N ⊂ M(X ) converges vaguely to µ if they converge with respect to the vague topology. It will be denoted by

In the following, we present some important results regarding the weak and vague topology.

Proposition B.0.7. The set D(X ) is closed in M(X ) for the vague topology Before the next statements we need some definitions. Definition B.0.8. A topological space X is said to be sequentially compact if every sequence has a converging subsequence to a point of X.

Definition B.0.9. A subspace Y of a topological space X is relatively compact if its closure is compact.

Proposition B.0.10. A set S ⊂ M(X ) is relatively compact for the vague topology if and only if sup{µ(K) : µ ∈ S} is finite for all compact sets K ⊂ X .

Theorem B.0.11 (Portmanteau Theorem). Consider a sequence of measures µ, {µ n } ∈ M(X ). Then, µ n converges vaguely to µ if and only if one of the following is satisfied:

• for all open sets U ⊂ X and all bounded closed sets F ⊂ X , Definition B.0.12. Given two non-negative Radon measures on X , µ is said to be absolutely continuous with respect to ν if ν(A) = 0 implies µ(A) = 0 for any A ⊂ X Borel set. This is denoted by µ ν.

Theorem B.0.13 (Radon-Nikodym Theorem). Consider µ, ν two non-negative Radon measures on X . Assume µ ν. Then, there exists a measurable non-negatice function g : X → [0, ∞), unique ν-a.e, such that µ(A) = A gdν.

(B.5

This function is denoted by dµ dν and is called the Radon-Nikodym derivative of µ with respect to ν.