Module temporal_ml

Source
Expand description

Differentiable temporal feature extraction.

Defines the TemporalOps trait for computing fixed-size feature vectors from variable-length embedding trajectories. The AnalyticBackend implementation uses closed-form computations (no ML framework needed).

Future backends (BurnBackend, TorchBackend) will implement the same trait with learnable parameters for end-to-end training.

§Feature Vector Layout

The output is a fixed-size feature vector regardless of trajectory length:

SectionSizeDescription
Mean velocityDAverage velocity per dimension
Drift magnitude1L2 drift from first to last
VolatilityDPer-dimension realized volatility
Soft change point count1Smoothed number of regime changes
Multi-scale driftSDrift at S temporal scales

Total: 2*D + 2 + S features.

Structs§

AnalyticBackend
Pure-Rust analytic feature extractor (non-differentiable).
AnalyticConfig
Configuration for the analytic backend.

Traits§

TemporalOps
Temporal feature extraction operations.

Functions§

compute_scale_drift 🔒
Average drift magnitude at a given temporal scale.
soft_change_point_count 🔒
Soft change point count: number of points where the local deviation exceeds threshold standard deviations, smoothed by a running window.