mvtsa.segmentation.permutation_test_segments#

mvtsa.segmentation.permutation_test_segments(X, cost='l2', max_segments=10, n_permutations=50, alpha=0.05, initial_size=None, cost_params=None, random_state=None)[source]#

Permutation test for the number of segments.

For every c the observed cost reduction from c-1 to c segments is compared with the reductions obtained after randomly permuting the samples inside each segment of the (c-1)-segmentation, which keeps the coarser structure but destroys the finer one. Returns the p-values and the largest c up to which all tests are significant.