News for hackers. Stuff that matters.
Re:Show HN: Automated smooth Nth order derivatives of noisy ... by youoy on Thursday October 17, 2024 @07:39AM (#41868662)
Nice work! Just one quick question (maybe it's clear but I have not looked at it in depth). It says it computes the derivative for non-uniformly sampled time series data and the example image shows this. Is this also well behaved if the sampled measurements have noise (it is not the case of the example)? Or should one use a different approach for that? Thanks!
Re:Show HN: Automated smooth Nth order derivatives of noisy ... by hugohadfield on Thursday October 17, 2024 @07:52AM (#41868758)
Thanks! So the example image is actually with both non-uniformly sampled measurements and noise :) works great for both/either
Re:Show HN: Automated smooth Nth order derivatives of noisy ... by hugohadfield on Thursday October 17, 2024 @07:54AM (#41868772)
Noise is added here: ``` # Generate noisy sinusoidal data with random time points np.random.seed(0) t = sorted(np.random.uniform(0.0, 10.0, 100)) noise_std = 0.01 y = np.sin(t) + noise_std * np.random.randn(len(t)) true_first_derivative = np.cos(t) true_second_derivative = -np.sin(t) ``` changing noise_std will change the magnitude of the noise added, hope that helps!
Re:Show HN: Automated smooth Nth order derivatives of noisy ... by youoy on Thursday October 17, 2024 @08:00AM (#41868814)
Ah true! Now I see it on the image too, I was looking at it on the phone and it did not look like it. I will definitely give it a try! Thank you very much
Re:Show HN: Automated smooth Nth order derivatives of noisy ... by hugohadfield on Thursday October 17, 2024 @08:06AM (#41868852)
no problem!