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
cthe observed cost reduction fromc-1tocsegments 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 largestcup to which all tests are significant.