compute_f¶
- compute_f(series: numpy.ndarray, k: int, p: numpy.ndarray, pp: numpy.ndarray) Tuple[numpy.ndarray, list] [source]¶
Compute F. F[a][b][k] - minimum approximation error on series[a:b+1] with k outliers.
- Parameters
series (numpy.ndarray) – array to count F
k (int) – number of outliers
p (numpy.ndarray) – array of sums of elements,
p[i]
- sum from 0th to i elementspp (numpy.ndarray) – array of sums of squares of elements,
pp[i]
- sum of squares from 0th to i elements
- Returns
result – array F, outliers_indices
- Return type
np.ndarray