extrap_linear_backward¶
- extrap_linear_backward(sample: Tensor, sample_at: Tensor, prev_data: Tensor, next_data: Tensor, step_time: float, *, adjust: Callable[[Tensor], Tensor] | None = None, **kwargs) tuple[Tensor, Tensor][source]¶
Extrapolates out linearly to the previous state.
\[\begin{split}\begin{align*} X(0) &= X(\Delta t) - \left(\frac{X(\Delta t) - X(t_s)}{\Delta t - t_s} \right) \Delta t \\ X(\Delta t) &= f(D(\Delta t)) \end{align*}\end{split}\]- Parameters:
sample (torch.Tensor) – sample from which to extrapolate, \(X(t=t_s)\)
sample_at (torch.Tensor) – relative time at which to sample data, \(t_s\).
prev_data (torch.Tensor) – most recent observation prior to sample time, \(D(t=0)\).
next_data (torch.Tensor) – most recent observation subsequent to sample time, \(D(t=\Delta t)\).
step_time (float) – length of time between the prior and subsequent observations, \(\Delta t\).
adjust (Callable[[torch.Tensor], torch.Tensor] | None, optional) – function to apply to the next state before extrapolating, identity when
None, \(f\). Defaults toNone.
- Returns:
extrapolated data at neighboring steps, \((X(t=0), X(t=\Delta t))\).
- Return type: