single_run

Single-run analysis: one detection trace on one labeled data provider.

class pysatl_cpd.core.single_run.SingleRun(*, trace, provider)[source]

Bases: Generic[TraceT, ProviderT]

One run: a trace and the labeled series it was produced from.

P is LabeledData so that description() can read annotation (e.g. PandasLabeledData).

Parameters:
  • trace (TraceT)

  • provider (ProviderT)

trace: TraceT
provider: ProviderT
description()[source]

Build a hashable description of this run.

Returns:

Description combining the detector and provider metadata.

Return type:

SingleRunDescription[Any]

__init__(*, trace, provider)
Parameters:
  • trace (TraceT)

  • provider (ProviderT)

Return type:

None

class pysatl_cpd.core.single_run.SingleRunDescription(*, detector_description, provider_description)[source]

Bases: Generic[AnnotationT]

Hashable description of a single run.

Combines the detector and data provider metadata so that runs can be compared, cached, or used as dictionary keys.

Variables:
  • detector_description – Description of the detector used for the run.

  • provider_description – Annotation of the data provider used for the run.

Parameters:
detector_description: ChangePointDetectorDescription
provider_description: AnnotationT
__hash__()[source]

Hash based on provider and detector description.

Return type:

int

__init__(*, detector_description, provider_description)
Parameters:
Return type:

None