StephanDollberg commented on PR #150:
URL: https://github.com/apache/otava/pull/150#issuecomment-4327396526
Mega windows (1000) certainly seem to behave better, though I am still
seeing some extra changepoints that don't make sense on first sight (anyway not
relevant here).
I guess what it doesn't solve is very recent changepoints where the range of
points to the right of it is very small.
Something like the following shows the issue:
``` diff
diff --git a/tests/analysis_test.py b/tests/analysis_test.py
index 4f40e2f..bd3fc97 100644
--- a/tests/analysis_test.py
+++ b/tests/analysis_test.py
@@ -66,6 +66,23 @@ def test_single_series():
assert indexes == [10]
+def test_large_window_reports_tail_spike_change_point():
+ series = np.random.default_rng(2).normal(loc=100.0, scale=5.0, size=303)
+ series[-4] = 150.0
+
+ cps, _ = compute_change_points(
+ series,
+ window_len=1000,
+ max_pvalue=0.001,
+ min_magnitude=0.01,
+ )
+
+ assert len(series) - 4 in [cp.index for cp in cps]
```
The min segment length thing does work around that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]