HybridInterpolate#

class hypercoil.nn.interpolate.HybridInterpolate(max_consecutive_linear: int = 3, oversampling_frequency: float = 8, maximum_frequency: float = 1, sampling_period: float = 1, frequency_thresh: float = 0.3)[source]#

Hybrid interpolation module.

Hybrid interpolation uses the linear method for unseen frames that are no more than max_consecutive_linear frames away from a seen frame, and the spectral method otherwise. Imputation proceeds as follows:

  • Unseen frames are divided into two groups according to the approach that will be used for imputation.

  • Spectral interpolation is applied using the seen time frames.

  • Linear interpolation is applied using the seen time frames, together with the frames interpolated using the spectral method.

Parameters:
max_consecutive_linearint or None (default 3)

The maximum number of consecutive frames for which the linear method will be used; any unseen frames that cannot be imputed using this maximum are instead imputed using the spectral approach.

Methods

__call__(input, mask, *[, key])

Call self as a function.