Skip to content

probably non causality in the smoothing #2

Description

@HeinrichHaller

The gaussian_filter1d function from the scipy.ndimage module, when applied to a time series, is probably not strictly causal because it applies the Gaussian smoothing both forward and backward from each point in the series. This means that the output at any given time point is influenced by data from both the past and the future relative to that point.

series_smooth = gaussian_filter1d(slow, sigma=gaussian_sigma)

I think what is done by jdherty here is a rolling kernel regression with a
def gaussian_kernel(x, y, h, **kwargs): distances = cdist(x, y, 'sqeuclidean') return np.exp(-distances / (2 * h ** 2))

kernel. This is needed to not cause 'repainting' as well.
Thanks for having a look at it!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions