mvtsa.segmentation.NeighborMergeSegmenter#
- class mvtsa.segmentation.NeighborMergeSegmenter(dissimilarity, n_segments=None, threshold=None, initial_size=20, name='NeighborMerge')[source]#
Bases:
BaseSegmenterBottom-up merging of adjacent segments by a pairwise dissimilarity.
- Parameters:
- dissimilarity
callable() dissimilarity(X, (a, b), (b, c)) -> float: how different the adjacent segmentsX[a:b]andX[b:c]are (0 = identical).- n_segments
int,optional Stop at this number of segments.
- threshold
float,optional Stop when the smallest dissimilarity exceeds
threshold.- initial_size
int Length of the initial segments.
- name
str Name stored in the result.
- dissimilarity
- Attributes:
- tree_
MergeTree Merge hierarchy;
criterionholds the dissimilarity of each merge andtotal_costits running sum.
- tree_