examples.utils.context_features
Feature builders for single-state dynamical systems.
@dataclass
class
SingleStateContextEmbedding:
Construct auxiliary features for single-state trajectories.
The nanorings dataset only contains an AMR channel (and a shared H-field drive). This helper reproduces the manual feature engineering we explored earlier, but keeps the original state untouched: we expose the augmented features separately so callers can provide them as inputs to the drift or diffusion networks without inflating the state dimension.
Example usage::
builder = SingleStateContextEmbedding(context_points=5)
state, inputs = builder.build(trajectories, h_signal, time_grid, metadata)
Here state is the original AMR/H tensor, while inputs contains the
sinusoidal harmonics and context windows described below.