We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In my machine, the following demonstrates more than 100x speed-up.
import pandas as pd import numpy as np import timeit import hampel # assumes `pip install hampel` def much_faster_hampel(series, window_length, threshold=3): # Please refer to [1] for `hampel_filter_forloop_numba` implementation. # [1] https://gist.github.com/adrianomitre/2ced5544421eca031180782cc30798af result, outlier_indices = hampel_filter_forloop_numba(series.values, window_length, threshold) result[outlier_indices] = np.nan return result ts_len = 2**8 win_sz = 7 ts = pd.Series(np.random.rand(ts_len)) # causes JIT compilation much_faster_hampel(ts, win_sz) timeit.timeit(lambda: hampel.hampel(ts, win_sz), number=100) timeit.timeit(lambda: much_faster_hampel(ts, win_sz), number=100)
Please refer to this gist for hampel_filter_forloop_numba implementation.
hampel_filter_forloop_numba
The text was updated successfully, but these errors were encountered:
In my machine, the following demonstrates more than 100x speed-up. import pandas as pd import numpy as np import timeit import hampel # assumes `pip install hampel` def much_faster_hampel(series, window_length, threshold=3): # Please refer to [1] for `hampel_filter_forloop_numba` implementation. # [1] https://gist.github.com/adrianomitre/2ced5544421eca031180782cc30798af result, outlier_indices = hampel_filter_forloop_numba(series.values, window_length, threshold) result[outlier_indices] = np.nan return result ts_len = 2**8 win_sz = 7 ts = pd.Series(np.random.rand(ts_len)) # causes JIT compilation much_faster_hampel(ts, win_sz) timeit.timeit(lambda: hampel.hampel(ts, win_sz), number=100) timeit.timeit(lambda: much_faster_hampel(ts, win_sz), number=100) Please refer to this gist for hampel_filter_forloop_numba implementation.
Sorry, but you are referencing a completely different library. The library you are importing is not at all used in mine.
Sorry, something went wrong.
No branches or pull requests
In my machine, the following demonstrates more than 100x speed-up.
Please refer to this gist for
hampel_filter_forloop_numba
implementation.The text was updated successfully, but these errors were encountered: