bisegment

Bisegment-based policies for no-reset classification evaluation.

class pysatl_cpd.benchmark.online.noreset.metrics.policy.bisegment.BisegmentPolicyBase(*, max_delay, strict=True)[source]

Bases: ABC, Generic

Shared implementation for no-reset bisegment policies.

Parameters:
  • max_delay (int) – Maximum allowed delay (in steps) for a detection to be considered a true positive. Must be non-negative.

  • strict (bool) – Whether to use strict inequality when comparing detection function values against the threshold (default True).

Raises:

ValueError – If max_delay is negative.

__init__(*, max_delay, strict=True)[source]
Parameters:
Return type:

None

apply(run, threshold)[source]

Apply the policy to a single run and return a classified trace.

Validates the run as a bisegment run, computes detection points in both the false and true regions, and packages the result into a NoResetDetectionTrace.

Parameters:
Returns:

Run wrapping a classified no-reset trace.

Return type:

SingleRun[NoResetDetectionTrace[TypeVar(StateT, bound= OnlineAlgorithmState)], TypeVar(ProviderT, bound= LabeledData[Any, Any])]

class pysatl_cpd.benchmark.online.noreset.metrics.policy.bisegment.PointBasedPolicy(*, max_delay, strict=True)[source]

Bases: BisegmentPolicyBase, Generic

Point-based no-reset policy.

Parameters:
class pysatl_cpd.benchmark.online.noreset.metrics.policy.bisegment.EventBasedPolicy(*, max_delay, strict=True)[source]

Bases: BisegmentPolicyBase, Generic

Event-based no-reset policy.

Parameters:
class pysatl_cpd.benchmark.online.noreset.metrics.policy.bisegment.MixedPolicy(*, max_delay, strict=True)[source]

Bases: BisegmentPolicyBase, Generic

Event-based false region and point-based true region policy.

Parameters: