mvtsa.segmentation.select_n_segments#
- mvtsa.segmentation.select_n_segments(X, cost='l2', method='knee', max_segments=20, rr_threshold=0.05, initial_size=None, cost_params=None, **kwargs)[source]#
Choose the number of segments of a cost-based segmentation.
- Parameters:
- method{“knee”, “rr”, “bic”, “permutation”, “persistence”}
"knee": elbow of the cost curve;"rr": the largestcwhose relative reduction still exceedsrr_threshold;"bic": minimal \(T\log(cost/T)+k\,c\log T\) (Gaussian errors);"permutation":permutation_test_segments();"persistence": the largest gap of the logarithmic persistence (merge-cost lifetime) of the change points of the merge hierarchy.
- Returns: