Signature inversion

signatory.invert_signature(signature: torch.Tensor, depth: int, channels: int, initial_position: Optional[torch.Tensor] = None) torch.Tensor

Invert the signature with the insertion algorithm: reconstruct a stream of data given its signature. Given that the signature is invariant by translation, the initial position of the stream is not recovered.

The input signature is the signature transform of depth depth of a batch of paths: it should be a result from the signatory.signature() function. The output is a tensor of shape \((N, L, C)\), where \(N\) is the batch size, \(L\) is the length of the reconstructed stream of data, with \(L = depth + 1\), and \(C\) denotes the number of channels.

Parameters
  • signature (torch.Tensor) – The signature of a batch of paths, as returned by signatory.signature(). This should be a two-dimensional tensor.

  • depth (int) – The depth that signature has been calculated to.

  • channels (int) – The number of channels in the batch of paths that was used to compute signature.

  • initial_position (None or torch.Tensor, optional) – Defaults to None. If it is a torch.Tensor then it must be of size \((N, C)\), corresponding to the initial position of the paths. If None, the reconstructed paths are set to begin at zero.

Returns

The torch.Tensor corresponding to a batch of inverted paths.