signature#

int signature_float(const float *path, double *out, uint64_t dimension, uint64_t length, uint64_t degree, bool time_aug = false, bool lead_lag = false, double end_time = 1., bool horner = true) noexcept#

Computes the signature of a path of type float.

Parameters:
  • path – Pointer to path data (row-major), size = length * dimension.

  • out – Pointer to output buffer (preallocated), size = sig_length(dimension, degree).

  • dimension – Dimension of the path.

  • length – Length of the path.

  • degree – Truncation degree of the signature.

  • time_aug – Whether to add time augmentation (default = false).

  • lead_lag – Whether to apply lead-lag transform (default = false).

  • end_time – End time for time augmentation (default = 1.0).

  • horner – Whether to use Horner’s scheme (default = true).

Returns:

Status code (0 = success).

int signature_double(const double *path, double *out, uint64_t dimension, uint64_t length, uint64_t degree, bool time_aug = false, bool lead_lag = false, double end_time = 1., bool horner = true) noexcept#
int signature_int32(const int32_t *path, double *out, uint64_t dimension, uint64_t length, uint64_t degree, bool time_aug = false, bool lead_lag = false, double end_time = 1., bool horner = true) noexcept#
int signature_int64(const int64_t *path, double *out, uint64_t dimension, uint64_t length, uint64_t degree, bool time_aug = false, bool lead_lag = false, double end_time = 1., bool horner = true) noexcept#

batch_signature#

int batch_signature_float(const float *path, double *out, uint64_t batch_size, uint64_t dimension, uint64_t length, uint64_t degree, bool time_aug = false, bool lead_lag = false, double end_time = 1., bool horner = true, int n_jobs = 1) noexcept#

Computes the signature of a path of type float.

Parameters:
  • path – Pointer to path batch data (row-major), size = batch_size * length * dimension.

  • out – Pointer to output buffer (row-major, preallocated), size = batch_size * sig_length(dimension, degree).

  • batch_size – Batch size of the paths.

  • dimension – Dimension of the path.

  • length – Length of the path.

  • degree – Truncation degree of the signature.

  • time_aug – Whether to add time augmentation (default = false).

  • lead_lag – Whether to apply lead-lag transform (default = false).

  • end_time – End time for time augmentation (default = 1.0).

  • horner – Whether to use Horner’s scheme (default = true).

  • n_jobs – Number of threads to run in parallel. If n_jobs = 1, the computation is run serially. If set to -1, all available threads are used. For n_jobs below -1, (max_threads + 1 + n_jobs) threads are used. For example if n_jobs = -2, all threads but one are used (default = 1).

Returns:

Status code (0 = success).

int batch_signature_double(const double *path, double *out, uint64_t batch_size, uint64_t dimension, uint64_t length, uint64_t degree, bool time_aug = false, bool lead_lag = false, double end_time = 1., bool horner = true, int n_jobs = 1) noexcept#
int batch_signature_int32(const int32_t *path, double *out, uint64_t batch_size, uint64_t dimension, uint64_t length, uint64_t degree, bool time_aug = false, bool lead_lag = false, double end_time = 1., bool horner = true, int n_jobs = 1) noexcept#
int batch_signature_int64(const int64_t *path, double *out, uint64_t batch_size, uint64_t dimension, uint64_t length, uint64_t degree, bool time_aug = false, bool lead_lag = false, double end_time = 1., bool horner = true, int n_jobs = 1) noexcept#

sig_backprop#

int sig_backprop_float(const float *path, double *out, const double *sig_derivs, const double *sig, uint64_t dimension, uint64_t length, uint64_t degree, bool time_aug = false, bool lead_lag = false, double end_time = 1.) noexcept#

Backpropagation through the signature_float function.

Parameters:
  • path – Pointer to path data (row-major), size = length * dimension.

  • out – Pointer to output buffer (preallocated), size = sig_length(dimension, degree).

  • sig_derivs – Pointer to derivatives with respect to the signature, size = sig_length(dimension, degree).

  • sig – Pointer to signature of the path (precomputed), size = sig_length(dimension, degree).

  • dimension – Dimension of the path.

  • length – Length of the path.

  • degree – Truncation degree of the signature.

  • time_aug – Whether time augmentation was applied (default = false).

  • lead_lag – Whether the lead-lag transform was applied (default = false).

  • end_time – End time for time augmentation (default = 1.0).

Returns:

Status code (0 = success).

int sig_backprop_double(const double *path, double *out, const double *sig_derivs, const double *sig, uint64_t dimension, uint64_t length, uint64_t degree, bool time_aug = false, bool lead_lag = false, double end_time = 1.) noexcept#
int sig_backprop_int32(const int32_t *path, double *out, const double *sig_derivs, const double *sig, uint64_t dimension, uint64_t length, uint64_t degree, bool time_aug = false, bool lead_lag = false, double end_time = 1.) noexcept#
int sig_backprop_int64(const int64_t *path, double *out, const double *sig_derivs, const double *sig, uint64_t dimension, uint64_t length, uint64_t degree, bool time_aug = false, bool lead_lag = false, double end_time = 1.) noexcept#

batch_sig_backprop#

int batch_sig_backprop_float(const float *path, double *out, const double *sig_derivs, const double *sig, uint64_t batch_size, uint64_t dimension, uint64_t length, uint64_t degree, bool time_aug = false, bool lead_lag = false, double end_time = 1., int n_jobs = 1) noexcept#

Backpropagation through the batch_signature_float function.

Parameters:
  • path – Pointer to path batch data (row-major), size = batch_size * length * dimension.

  • out – Pointer to output buffer (row-major, preallocated), size = batch_size * sig_length(dimension, degree).

  • sig_derivs – Pointer to derivatives with respect to the signatures (row-major), size = batch_size * sig_length(dimension, degree).

  • sig – Pointer to signatures of the paths (row-major, precomputed), size = batch_size * sig_length(dimension, degree).

  • batch_size – Batch size of the paths.

  • dimension – Dimension of the path.

  • length – Length of the path.

  • degree – Truncation degree of the signature.

  • time_aug – Whether time augmentation was applied (default = false).

  • lead_lag – Whether the lead-lag transform was applied (default = false).

  • end_time – End time for time augmentation (default = 1.0).

  • n_jobs – Number of threads to run in parallel. If n_jobs = 1, the computation is run serially. If set to -1, all available threads are used. For n_jobs below -1, (max_threads + 1 + n_jobs) threads are used. For example if n_jobs = -2, all threads but one are used (default = 1).

Returns:

Status code (0 = success).

int batch_sig_backprop_double(const double *path, double *out, const double *sig_derivs, const double *sig, uint64_t batch_size, uint64_t dimension, uint64_t length, uint64_t degree, bool time_aug = false, bool lead_lag = false, double end_time = 1., int n_jobs = 1) noexcept#
int batch_sig_backprop_int32(const int32_t *path, double *out, const double *sig_derivs, const double *sig, uint64_t batch_size, uint64_t dimension, uint64_t length, uint64_t degree, bool time_aug = false, bool lead_lag = false, double end_time = 1., int n_jobs = 1) noexcept#
int batch_sig_backprop_int64(const int64_t *path, double *out, const double *sig_derivs, const double *sig, uint64_t batch_size, uint64_t dimension, uint64_t length, uint64_t degree, bool time_aug = false, bool lead_lag = false, double end_time = 1., int n_jobs = 1) noexcept#