annotations

Annotation type definitions for time series data.

type pysatl_cpd.data.typedefs.annotations.AnnotationBuilder = Callable[[Sequence], MergedAnnotationT]
class pysatl_cpd.data.typedefs.annotations.TimeseriesAnnotation(*, name, source=None, metadata=<factory>)[source]

Bases: object

Base annotation for time series data.

This class is the common source for all time series annotations, providing a name, optional source, and metadata storage.

Variables:
  • name – Unique identifier for this annotation.

  • source – Optional source identifier or description.

  • metadata – Additional key-value metadata storage.

Parameters:
name: str
source: str | None
metadata: frozendict[str, Hashable]
property provider_type: ProviderType
Returns:

The provider type identifier for time series annotations.

Return type:

ProviderType

__hash__()[source]

Return a stable hash for the annotation identity.

Return type:

int

__init__(*, name, source=None, metadata=<factory>)
Parameters:
Return type:

None

class pysatl_cpd.data.typedefs.annotations.UnlabeledTimeseriesAnnotation(*, name, source=None, metadata=<factory>)[source]

Bases: TimeseriesAnnotation

Annotation for unlabeled time series data.

This annotation type represents time series without explicit segment or change point labels, used for unsupervised detection.

Parameters:
  • name (str) – Unique identifier for this annotation.

  • source (str | None) – Optional source identifier or description.

  • metadata (frozendict[str, Hashable]) – Additional key-value metadata storage.

property provider_type: ProviderType
Returns:

The provider type identifier for unlabeled time series.

Return type:

ProviderType

__hash__()[source]

Return a stable hash for unlabeled annotations.

Return type:

int

__init__(*, name, source=None, metadata=<factory>)
Parameters:
Return type:

None

class pysatl_cpd.data.typedefs.annotations.SegmentAnnotation(*, name, source=None, metadata=<factory>, state)[source]

Bases: TimeseriesAnnotation

Annotation with segment state information.

This annotation type represents time series with a segment state descriptor, used for supervised change point detection.

Variables:

state – Descriptor for the segment state.

Parameters:
state: StateDescriptor
property provider_type: ProviderType
Returns:

The provider type identifier for segment annotations.

Return type:

ProviderType

__hash__()[source]

Return a stable hash for segment annotations.

Return type:

int

__init__(*, name, source=None, metadata=<factory>, state)
Parameters:
Return type:

None

class pysatl_cpd.data.typedefs.annotations.NoChangeSeriesAnnotation(*, name, source=None, metadata=<factory>, state)[source]

Bases: SegmentAnnotation

Annotation for series without change points.

This annotation type represents a time series where no change points are expected, used as negative examples in training.

Parameters:
  • name (str) – Unique identifier for this annotation.

  • source (str | None) – Optional source identifier or description.

  • metadata (frozendict[str, Hashable]) – Additional key-value metadata storage.

  • state (StateDescriptor) – Descriptor for the segment state.

property provider_type: ProviderType
Returns:

The provider type identifier for no-change series.

Return type:

ProviderType

__hash__()[source]

Return a stable hash for no-change annotations.

Return type:

int

__init__(*, name, source=None, metadata=<factory>, state)
Parameters:
Return type:

None

class pysatl_cpd.data.typedefs.annotations.BisegmentAnnotation(*, name, source=None, metadata=<factory>, transition)[source]

Bases: TimeseriesAnnotation

Annotation with bisegment transition information.

This annotation type represents time series with a transition descriptor between two segments, used for binary segmentation.

Variables:

transition – Descriptor for the segment transition.

Parameters:
transition: TransitionDescriptor
property provider_type: ProviderType
Returns:

The provider type identifier for bisegment annotations.

Return type:

ProviderType

__hash__()[source]

Return a stable hash for bisegment annotations.

Return type:

int

name: str
source: str | None
metadata: frozendict[str, Hashable]
__init__(*, name, source=None, metadata=<factory>, transition)
Parameters:
Return type:

None