mvtsa.segmentation.StateSegmenter#
- class mvtsa.segmentation.StateSegmenter(segmenter=None, n_states=3, descriptor='gaussian', metric='gaussian_w2', linkage='average', distance_threshold=None, merge_adjacent=True, n_components=2, min_length=0.5)[source]#
Bases:
BaseSegmenterSegment-then-cluster state detection.
- Parameters:
- segmenter
segmenterobject Any segmenter of the package (default: bottom-up with the Gaussian cost and
n_segments=20).- n_states
int,optional Number of states; alternatively
distance_threshold.- descriptor{“gaussian”, “pca”, “mean”}
- metric
str - linkage{“average”, “complete”, “single”, “ward”}
Agglomerative clustering of the segment models (Ward only with the Euclidean metric on means).
- distance_threshold
float,optional - merge_adjacentbool
Merge consecutive segments that received the same state.
- min_length
intorfloat,optional Segments shorter than this (default: half the mean segment length) do not take part in the clustering – they are typically transitions – and receive the state of the nearest cluster afterwards. A float is a fraction of the mean segment length.
- segmenter
- Attributes: