linear_interpolate: Linear interpolation#
- hypercoil.functional.interpolate.linear_interpolate(data: Tensor, mask: Tensor) Tensor[source]#
Interpolate unseen time frames as a proximity-weighted convex combination of nearest neighbours.
- Parameters:
- datatensor
Time series data.
- maskboolean tensor
Boolean tensor indicating whether the value in each frame of the input time series is observed.
Trueindicates that the original data are “good” or observed, whileFalseindicates that they are “bad” or missing and flags them for interpolation.
- Returns:
- Tensor
Input dataset with missing frames imputed.