Extrapolation¶
- class Extrapolation(*args, **kwargs)[source]¶
Bases:
ProtocolCallable used to extrapolate in time to two tensors.
Here,
sampleshould be the tensor which was “sampled” at a time between two discrete observations,prev_dataandnext_data.sample_atshould be the length of time between the prior observation and this sample.step_timeis the total length of time between the nearest two observations.The result is a 2-tuple of tensors, both shaped like
data, the first being the the extrapolated data at the time of the nearest prior discrete observation and the second being the extrapolated data at the time of the nearest subsequent discrete observations.- Parameters:
sample (torch.Tensor) – sample from which to extrapolate.
sample_at (torch.Tensor) – relative time of the data from which to extrapolate.
prev_data (torch.Tensor) – most recent observation prior to sample time.
next_data (torch.Tensor) – most recent observation subsequent to sample time.
step_time (float) – length of time between the prior and subsequent observations.
- Returns:
extrapolated data at the start and end of the step.
- Return type: