Expand description
Vector differential calculus over temporal trajectories.
Provides first and second order finite differences, drift quantification, and basic stochastic process characterization for embedding trajectories.
ยงConventions
- Timestamps are in microseconds.
- Velocity units: vector displacement per microsecond.
- All functions operate on pre-sorted
(timestamp, &[f32])slices.
Structsยง
- Drift
Report - Drift report identifying the most changed dimensions.
Constantsยง
- MIN_
POINTS_ ๐ACCELERATION - Minimum number of points for acceleration computation.
- MIN_
POINTS_ ๐STOCHASTIC - Minimum number of points for stochastic characterization.
- MIN_
POINTS_ ๐VELOCITY - Minimum number of points for velocity computation.
Functionsยง
- acceleration
- Compute acceleration (second-order finite difference) at a target timestamp.
- adf_
statistic - Augmented Dickey-Fuller (ADF) test statistic for stationarity.
- drift_
magnitude_ cosine - Compute cosine drift (1 - cosine_similarity) between two snapshots.
- drift_
magnitude_ l2 - Compute L2 drift magnitude between two snapshots.
- drift_
report - Generate a drift report between two snapshots.
- find_
closest_ ๐index - Find index of the closest point to a target timestamp.
- hurst_
exponent - Hurst exponent estimation via rescaled range (R/S) analysis.
- linear_
regression_ ๐slope - Simple linear regression slope.
- realized_
volatility - Realized volatility over a trajectory (standard deviation of returns).
- rescaled_
range ๐ - Rescaled range statistic for a given window size.
- velocity
- Compute velocity (first-order finite difference) at a target timestamp.