QDpy
Loading...
Searching...
No Matches
qdpy.algorithms.path_signature.PathSignature Class Reference

Encode displacements and ordered channel interactions. More...

Public Member Functions

 descriptor_size (self)
 encode (self, trajectory, *, times=None)
 Encode a path with equally spaced observations or explicit sample times.
 make_archive (self, trajectories, cells, *, fitness_domain=(-np.inf, np.inf), fitness_weight=1., seed=0)
 Fit reproducible CVT centroids using reference trajectories.

Detailed Description

Encode displacements and ordered channel interactions.

Compute level one and optionally level two of a piecewise linear signature.

Level one stores the sum of increments. Level two stores all ordered
pairs of coordinates in row-major order (first differential before
second). The descriptor omits the constant level zero. Signatures are
translation invariant. Adding a time channel can distinguish paths
that retrace their steps and helps when timing matters.

:param observation_size: Number of channels in each observation.
:param order: Signature truncation level, either 1 or 2.
:param scale: Positive scale per observation coordinate, shared across rollouts.
:param time_channel: Append normalized time for equally spaced samples.

Definition at line 21 of file path_signature.py.

Member Function Documentation

◆ descriptor_size()

qdpy.algorithms.path_signature.PathSignature.descriptor_size ( self)
Return the signature width, including the optional time channel.

Definition at line 51 of file path_signature.py.

◆ encode()

qdpy.algorithms.path_signature.PathSignature.encode ( self,
trajectory,
* ,
times = None )

Encode a path with equally spaced observations or explicit sample times.

Parameters
trajectoryFinite array with rows in chronological order.
timesOptional strictly increasing times used to build the time channel.
Returns
A finite vector of signature coefficients.
Use exact first and second iterated integrals for linear segments.

Definition at line 59 of file path_signature.py.

◆ make_archive()

qdpy.algorithms.path_signature.PathSignature.make_archive ( self,
trajectories,
cells,
* ,
fitness_domain = (-np.inf, np.inf),
fitness_weight = 1.,
seed = 0 )

Fit reproducible CVT centroids using reference trajectories.

Parameters
trajectoriesIndependently supplied paths used to fit the CVT.
cellsNumber of repertoire cells.
fitness_domainBounds on the scalar objective.
fitness_weightSigned fitness weight.
seedPrivate k-means seed.
Returns
CVTGrid over the encoded signatures.
Use reference paths for centroids and allow finite extrapolations at search time.

Definition at line 108 of file path_signature.py.


The documentation for this class was generated from the following file: