Macaulay2 » Documentation
Packages » PathSignatures :: PathSignatures
next | previous | forward | backward | up | index | toc

PathSignatures -- a package for working with signatures of algebraic paths

Description

PathSignatures is a package for studying the signature of piecewise polynomial paths.

The package heavily simplifies the process of obtaining data related to signature varieties, e.g. as in [1]. See Computing Path Varieties.

A polynomial path is a path $X: [0,1] \to \mathbb R^d$ whose coordinate functions are given by polynomials. A piecewise polynomial path is a path $X: [0,1] \to \mathbb R^d$ which is polynomial on each interval in a partition of $[0,1]$.

Given such a path $X$, its signature is the linear form $\sigma: T((\mathbb{R}^d)^*)\rightarrow \mathbb{R}$ on the tensor algebra of the dual of $\mathbb{R}^d$, whose image on a decomposable tensor $\alpha_1\otimes \dots\otimes \alpha_k$ is the iterated integral $$ \alpha_1\otimes \dots\otimes \alpha_k\overset{\sigma}{\mapsto} \int_0^1\int_0^{t_k}\dots\int_0^{t_2}\partial(\alpha_1 X)\dots \partial (\alpha_k X) d t_1\dots dt_k. $$ This form is invariant under translation, reparametrization and tree-like equivalence of $X$ and characterizes $X$ uniquely up to these relations.

In this package, we identify $T((\mathbb{R}^d)^*)$ with the free associative algebra over the alphabet $\{\texttt{1},\dots,\texttt{d}\}$ via $\texttt{i} \mapsto e_i^*$ where $e_1^*, \dots, e_d^*$ is the dual of the canonical basis of $\mathbb{R}^d$. For example, the word $\texttt{12}$ corresponds to $e_1^* \otimes e_2^*$.

It is easy to create a polynomial path:

i1 : R = QQ[t];
i2 : X = polyPath({t + t^2, t^3})

o2 = Path in 2-dimensional space with 1 polynomial segment:

        2       3
     {{t  + t, t }}

o2 : Path

A piecewise polynomial path is obtained by concatenating polynomial paths:

i3 : Y = X ** X

o3 = Path in 2-dimensional space with 2 polynomial segments:

        2       3     2       3
     {{t  + t, t }, {t  + t, t }}

o3 : Path

Any NCPolynomialRing can serve as a tensor algebra. Use wordAlgebra to quickly create one in variables $\texttt{Lt}_i$. The package introduces a convenient notation for words in this algebra.

i4 : A2 = wordAlgebra(2)

o4 = A2

o4 : NCPolynomialRing
i5 : [1,2]_A2 -- the word 12.

o5 = Lt Lt
       1  2

o5 : A2

To evaluate the signature of $\mathtt{X}$ at a tensor $\mathtt{w}$, use sig. The following computes the signed volume of the path; also see sgnVolTensor.

i6 : sig(X,[1,2]_A2-[2,1]_A2)

      7
o6 = --
     10

o6 : QQ

sig can also be used to obtain the $k$-th level signature tensor. Use wordFormat or tensorArray to display the tensor in a nicer way.

i7 : T = sig(X,2)

     1   2 13       27           2
o7 = -Lt  +--Lt Lt +--Lt Lt +2Lt
     2  2  20  2  1 20  1  2    1

o7 : QQ{Lt , Lt }
          1    2
i8 : T // wordFormat

     1          13          27
o8 = - [2, 2] + -- [2, 1] + -- [1, 2] + 2 [1, 1]
     2          20          20
i9 : T // tensorArray

                   27    13  1
o9 = {{0, 0}, {{2, --}, {--, -}}}
                   20    20  2

o9 : List

The package allows for the computation of signatures for parametrized families of paths.

i10 : S = QQ[a,b,c]

o10 = S

o10 : PolynomialRing
i11 : R = S[t]

o11 = R

o11 : PolynomialRing
i12 : X = polyPath({a*t+b*t^2,c*t^3})

o12 = Path in 2-dimensional space with 1 polynomial segment:

           2           3
      {{b*t  + a*t, c*t }}

o12 : Path
i13 : Y = X ** X

o13 = Path in 2-dimensional space with 2 polynomial segments:

           2           3       2           3
      {{b*t  + a*t, c*t }, {b*t  + a*t, c*t }}

o13 : Path
i14 : sig(X, sgnVolTensor(A2))

      1       1
o14 = -a*c + --b*c
      4      10

o14 : S

References

Améndola, C., Friz, P., & Sturmfels, B. (2019, January). Varieties of signature tensors. In Forum of Mathematics, Sigma (Vol. 7, p. e10). Cambridge University Press.

Authors

Version

This documentation describes version 1.0 of PathSignatures.

Citation

If you have used this package in your research, please cite it as follows:

@misc{PathSignaturesSource,
  title = {{PathSignatures: working with algebraic path signatures. Version~1.0}},
  author = {Felix Lotter and Oriol Reig and Angelo El Saliby and Carlos Amendola},
  howpublished = {A \emph{Macaulay2} package available at
    \url{https://github.com/Macaulay2/M2/tree/stable/M2/Macaulay2/packages}}
}

Exports

  • Types
  • Functions and commands
    • adjointWord -- image of a word through the shuffle algebra homomorphism induced by a polynomial map
    • CAxisTensor -- the signature tensor of the canonical axis path at a given level
    • CMonTensor -- the signature tensor of the canonical monomial path at a given level
    • concatPath -- concatenation of paths
    • halfshuffle -- compute the half-shuffle of an ordered pair of words
    • inner -- compute the inner product of two tensors.
    • lie -- lie bracket of two elements
    • lieBasis -- basis element corresponding to a Lyndon word in a Lie algebra
    • linPath -- constructor of single piece polynomial path
    • lyndonShuffle -- compute the representation of a tensor as a shuffle polynomial in Lyndon words
    • lyndonWords -- compute all Lyndon words of at most a given length on a given number of letters
    • matrixAction -- Diagonal matrix action on a tensor.
    • getCoefficientRing -- see Path
    • getDimension -- see Path
    • getNumberOfPieces -- see Path
    • getPieces -- see Path
    • polyPath -- constructor of single piece polynomial path
    • pwLinPath -- constructor of a piecewise linear path from a matrix
    • sgnVolTensor -- The signed volume tensor in a free associative algebra.
    • shuffle -- shuffle product of two words
    • sig -- compute the signature of a piecewise polynomial path.
    • tensorArray -- k-th level component of a tensor.
    • tensorExp -- Compute a component of the exponential of a tensor.
    • tensorLog -- Compute a component of the logarithm of a tensor.
    • tensorParametrization -- Constructs the morphism that maps a word to its coefficient in the given tensor.
    • wordAlgebra -- create a free algebra over a given alphabet
    • wordFormat -- display a tensor in word notation
    • wordString -- a string representing a word in wordFormat
  • Methods
    • adjointWord(NCRingElement,NCPolynomialRing,List) -- see adjointWord -- image of a word through the shuffle algebra homomorphism induced by a polynomial map
    • ambient(NCPolynomialRing) -- see ambient -- exported from the NCALgebra package.
    • antipode(NCRingElement) -- The antipode of a tensor
    • Array _ NCPolynomialRing -- create a word from an array
    • CAxisTensor(ZZ,NCPolynomialRing) -- see CAxisTensor -- the signature tensor of the canonical axis path at a given level
    • CMonTensor(ZZ,NCPolynomialRing) -- see CMonTensor -- the signature tensor of the canonical monomial path at a given level
    • concatPath(Path,Path) -- see concatPath -- concatenation of paths
    • Path ** Path -- see concatPath -- concatenation of paths
    • halfshuffle(NCRingElement,NCRingElement) -- see halfshuffle -- compute the half-shuffle of an ordered pair of words
    • NCRingElement >> NCRingElement -- see halfshuffle -- compute the half-shuffle of an ordered pair of words
    • inner(NCRingElement,NCRingElement) -- see inner -- compute the inner product of two tensors.
    • NCRingElement @ NCRingElement -- see inner -- compute the inner product of two tensors.
    • lieBasis(Array,NCPolynomialRing) -- see lieBasis -- basis element corresponding to a Lyndon word in a Lie algebra
    • lieBasis(List,NCPolynomialRing) -- see lieBasis -- basis element corresponding to a Lyndon word in a Lie algebra
    • linPath(List) -- see linPath -- constructor of single piece polynomial path
    • lyndonShuffle(NCRingElement) -- see lyndonShuffle -- compute the representation of a tensor as a shuffle polynomial in Lyndon words
    • lyndonWords(ZZ,ZZ) -- see lyndonWords -- compute all Lyndon words of at most a given length on a given number of letters
    • Matrix * NCRingElement -- see matrixAction -- Diagonal matrix action on a tensor.
    • matrixAction(Matrix,NCRing,NCRing) -- see matrixAction -- Diagonal matrix action on a tensor.
    • matrixAction(Matrix,NCRingElement,NCRing) -- see matrixAction -- Diagonal matrix action on a tensor.
    • coefficientRing(Path) -- see Path
    • dim(Path) -- see Path
    • getCoefficientRing(Path) -- see Path
    • getDimension(Path) -- see Path
    • getNumberOfPieces(Path) -- see Path
    • getPieces(Path) -- see Path
    • net(Path) -- see Path
    • Path ^ ZZ -- see Path
    • Path _ List -- see Path
    • Path _ Sequence -- see Path
    • Path _ ZZ -- see Path
    • polyPath(List) -- see polyPath -- constructor of single piece polynomial path
    • pwLinPath(Matrix) -- see pwLinPath -- constructor of a piecewise linear path from a matrix
    • sgnVolTensor(NCPolynomialRing) -- see sgnVolTensor -- The signed volume tensor in a free associative algebra.
    • NCRingElement ** NCRingElement -- see shuffle -- shuffle product of two words
    • NCRingElement ⧢ NCRingElement -- see shuffle -- shuffle product of two words
    • shuffle(NCRingElement,NCRingElement) -- see shuffle -- shuffle product of two words
    • sig(Path,List) -- see sig -- compute the signature of a piecewise polynomial path.
    • sig(Path,NCRingElement) -- see sig -- compute the signature of a piecewise polynomial path.
    • sig(Path,ZZ) -- see sig -- compute the signature of a piecewise polynomial path.
    • sig(Path,ZZ,NCRing) -- see sig -- compute the signature of a piecewise polynomial path.
    • substitute(Path,Ring) -- changes the coefficient ring of a path
    • NCRingElement @ ZZ -- see tensorArray -- k-th level component of a tensor.
    • tensorArray(NCRingElement) -- see tensorArray -- k-th level component of a tensor.
    • tensorArray(NCRingElement,ZZ) -- see tensorArray -- k-th level component of a tensor.
    • tensorExp(NCRingElement,ZZ) -- see tensorExp -- Compute a component of the exponential of a tensor.
    • tensorLog(NCRingElement,ZZ) -- see tensorLog -- Compute a component of the logarithm of a tensor.
    • tensorParametrization(NCRingElement) -- see tensorParametrization -- Constructs the morphism that maps a word to its coefficient in the given tensor.
    • wordAlgebra(List) -- see wordAlgebra -- create a free algebra over a given alphabet
    • wordAlgebra(ZZ) -- see wordAlgebra -- create a free algebra over a given alphabet
    • wordFormat(NCRingElement) -- see wordFormat -- display a tensor in word notation
    • wordString(NCRingElement) -- see wordString -- a string representing a word in wordFormat
  • Symbols
    • VarWordTable -- see tensorParametrization -- Constructs the morphism that maps a word to its coefficient in the given tensor.

For the programmer

The object PathSignatures is a package, defined in PathSignatures.m2, with auxiliary files in PathSignatures/.


The source of this document is in PathSignatures.m2:337:0.