mean_score#

mean_score(precomputed_params: ndarray, starts: ndarray, ends: ndarray, splits: ndarray) ndarray[source]#

Calculate the CUSUM score for a change in the mean.

Compares the mean of the data before and after the split within the interval from start:end (both inclusive).

Parameters:
precomputed_paramsnp.ndarray

Precomputed parameters from init_mean_score.

startsnp.ndarray

Start indices of the intervals to test for a change in the mean.

endsnp.ndarray

End indices of the intervals to test for a change in the mean.

splitsnp.ndarray

Split indices of the intervals to test for a change in the mean.

Returns:
np.ndarray

Scores for a difference in the mean at the given intervals and splits.

Notes

To optimize performance, no checks are performed on (starts, splits, ends).