-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
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
Anomalous indices loop #60
Comments
Ok. I figured it out. Basically what we have is: Each window has a score 10 Windows before [i to i+10-1] are all windows that include i. So this makes sense. Which means that every window that includes i exceeds the threshold means that i is a "problem". Further more:
Thats why we care just for the middle numbers/windows. |
@Anastasis-Iliopoulos Thank you for your interest! We will try to respond sooner if any questions arise in the future. |
Hello, I have a question about this snippet of code (the loop helps to find the anomalies):
comment says that given a point
i
, if all samples betweeni-timesteps+1
andi
are anomalies then the pointi
is anomaly.This loop starts from
N_STEPS - 1
which is (lets sayN_STEPS=10
) from 9 and ends tolen(X) - N_STEPS + 1
which is (lets saylen(X)=100
) the number 91.Then the
if
statement going to check (for each iteration) the samples fromdata_idx - N_STEPS + 1
todata_idx
So
iteration 1: all samples from
9-10+1
which is 0 to 9 (not inclusive)iteration 2: all samples from
10-10+1
which is 1 to 10 (not inclusive)....[going at the end].....
iteration 82: all samples from
10-10+1
which is 81 to 90 (not inclusive)In other words:
We check
i=9
with samples 0 to 8 (inclusive)We check
i=10
with samples 1 to 9 (inclusive)....[going at the end].....
We check
i=90
with samples 81 to 89 (inclusive)Question
I think we are missing i=92, 93, 94,....,99. Am I wrong? And why?
If am not wrong shouldn't the
for data_idx in range(N_STEPS - 1, len(X) - N_STEPS + 1)
be replaced withfor data_idx in range(N_STEPS - 1, len(X)):
in order to iterate until the end?Thank you in advance
The text was updated successfully, but these errors were encountered: