Skip to content
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

Extend Series #11

Open
RNKuhns opened this issue Mar 5, 2020 · 1 comment
Open

Extend Series #11

RNKuhns opened this issue Mar 5, 2020 · 1 comment

Comments

@RNKuhns
Copy link

RNKuhns commented Mar 5, 2020

The accompanying paper (https://arxiv.org/pdf/1906.03821.pdf) notes the SR part of the algorithm is extending the series by taking the gradient between the last observed point and the 'm' prior points.

The extend_series method to the SpectralResidual class is calculating the extension to the series as:

extension = [SpectralResidual.predict_next(values[-look_ahead - 2:-1])] * extend_num

The -look_ahead-2:-1 slice is passing the 6th to last to 2nd to last values to the predict_next method. This seems to stand in constrast to formula 8 in the paper, that indicates the average gradient used in the prediction is calculated by comparing the last observation with the prior 5 observations.

Wouldn't the predict_next method be comparing the 2nd to last value to the its prior five values as coded?

It seems like values[-look_ahead - 1:] would fit more with the description in the paper by passing the last observed value and the prior 5 values to the function.

@guinao
Copy link
Contributor

guinao commented May 12, 2020

The value at the last position is to be detected, so its value is not used to extend the series. The predict_next method uses value before it to predict a value for the last position.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants