dataframe-go icon indicating copy to clipboard operation
dataframe-go copied to clipboard

fix: holt-winters train.go runs off end of series and panics if start > 0

Open kevinroundy opened this issue 8 months ago • 1 comments

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.

kevinroundy avatar Apr 23 '25 19:04 kevinroundy

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

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

pjebs avatar Apr 25 '25 03:04 pjebs