diff --git a/polynomial_regression_series.go b/polynomial_regression_series.go index 66f615a..c5a4a08 100644 --- a/polynomial_regression_series.go +++ b/polynomial_regression_series.go @@ -139,8 +139,8 @@ func (prs *PolynomialRegressionSeries) values() (xvalues, yvalues []float64) { for index := startIndex; index < endIndex; index++ { x, y := prs.InnerSeries.GetValue(index) - xvalues[index] = x - yvalues[index] = y + xvalues[index-startIndex] = x + yvalues[index-startIndex] = y } return