v_optimal_hist¶
- v_optimal_hist(series: numpy.ndarray, bins_number: int, p: numpy.ndarray, pp: numpy.ndarray) numpy.ndarray [source]¶
Count an approximation error of a series with [1, bins_number] bins.
- Parameters
series (numpy.ndarray) – array to count an approximation error with bins_number bins
bins_number (int) – number of bins
p (numpy.ndarray) – array of sums of elements, p[i] - sum from 0th to i elements
pp (numpy.ndarray) – array of sums of squares of elements, p[i] - sum of squares from 0th to i elements
- Returns
error – approximation error of a series with [1, bins_number] bins
- Return type
np.ndarray