Path Signatures¶
The module signatures provides truncated tensor signatures
(Lyons 1998), log-signatures, random reservoir projections, and the
Salvi–Cass–Lyons signature kernel.
Truncated Signature¶
For a continuous path \(X : [0, T] \to \mathbb{R}^d\) of bounded variation, the signature is the formal series
with iterated Stieltjes integrals
For piecewise-linear input with increments \(\Delta_n\), the truncated signature obeys the multiplicative recursion
where \(\exp_M(\Delta) = \sum_{k=0}^M \Delta^{\otimes k} / k!\).
Log-Signature¶
The truncated tensor logarithm
lives in the truncated free Lie algebra and provides a more parsimonious representation.
Random Signature¶
Following Cuchiero–Schmocker–Teichmann (2023), one drives a random reservoir on \(\mathbb{R}^N\),
with random matrices \(A_i \in \mathbb{R}^{N \times N}\) whose entries are i.i.d. Gaussian with variance \(1/N\). The map \(X \mapsto Z_T\) is a finite-dimensional random projection of \(S(X)\).
Signature Kernel (Salvi–Cass–Lyons)¶
The signature inner product
solves the linear hyperbolic PDE
It is integrated on a uniform grid via the Goursat scheme
API¶
pub struct TruncatedSignature {
pub channels: usize,
pub level: usize,
pub tensors: Vec<Vec<f64>>,
}
pub fn path_signature(path: &[Vec<f64>], level: usize) -> Result<TruncatedSignature>;
pub fn log_signature(sig: &TruncatedSignature) -> Result<TruncatedLogSignature>;
pub struct RandomSignatureConfig {
pub reservoir_dim: usize, pub seed: u64, pub variance: f64,
}
pub fn random_signature(path: &[Vec<f64>], cfg: &RandomSignatureConfig)
-> Result<RandomSignatureResult>;
pub fn signature_kernel(x: &[Vec<f64>], y: &[Vec<f64>])
-> Result<SignatureKernelResult>;