dataframe-go
dataframe-go copied to clipboard
fix: holt-winters train.go runs off end of series and panics if start > 0
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.
I think you may be using start and end incorrectly. I might need to document it better.
https://otexts.com/fpp2/holt-winters.html