Skip to content

Conversation

kevinroundy
Copy link

holt-winters train.go runs off end of series and panics if Range.Start

The indexing limits used in the for loop are intended for hw.sf.Values, but since we are indexing into "y" instead, we run off the end of the array and panic if start > 0.

To fix this, we create a y_start and y_end and use those as limits and within the function in place of start and end.

start needs to be replaced with y_start.
@pjebs
Copy link
Collaborator

pjebs commented Apr 25, 2025

I think you may be using start and end incorrectly. I might need to document it better.

https://otexts.com/fpp2/holt-winters.html

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

Successfully merging this pull request may close these issues.

2 participants