optimal_sse

optimal_sse(left: int, right: int, p: numpy.ndarray, pp: numpy.ndarray) float[source]

Count the approximation error by 1 bin from left to right elements.

Parameters
  • left (int) – left border

  • right (int) – right border

  • p (numpy.ndarray) – array of sums of elements, p[i] - sum from first to i elements

  • pp (numpy.ndarray) – array of sums of squares of elements, pp[i] - sum of squares from first to i elements

Returns

result – approximation error

Return type

float