ranges

Threshold range definitions for no-reset benchmark campaigns.

class pysatl_cpd.benchmark.online.noreset.thresholds.ranges.ThresholdsRange(thresholds_range=<factory>)[source]

Bases: ABC

Base class for threshold range strategies.

Subclasses fill thresholds_range at initialisation (or defer it).

Variables:

thresholds_range – Sequence of threshold values, populated by __post_init__.

Parameters:

thresholds_range (Sequence[Number])

thresholds_range: Sequence[Number]
abstractmethod __post_init__()[source]

Generate a linearly spaced threshold grid.

Raises:

NotImplementedError – Subclasses must implement this method.

Return type:

None

__init__(thresholds_range=<factory>)
Parameters:

thresholds_range (Sequence[Number])

Return type:

None

class pysatl_cpd.benchmark.online.noreset.thresholds.ranges.ManualThresholdsRange(thresholds_range=<factory>, _values=())[source]

Bases: ThresholdsRange

A threshold range defined by an explicit list of values.

Parameters:
__post_init__()[source]

Populate the thresholds range from the explicit value list.

Return type:

None

__init__(thresholds_range=<factory>, _values=())
Parameters:
Return type:

None

class pysatl_cpd.benchmark.online.noreset.thresholds.ranges.LinearThresholdsRange(thresholds_range=<factory>, start=0.0, end=1.0, count=10)[source]

Bases: ThresholdsRange

A threshold range generated by linear interpolation.

Variables:
  • start – Start of the range.

  • end – End of the range.

  • count – Number of thresholds.

Parameters:
start: Number = 0.0
end: Number = 1.0
count: int = 10
__post_init__()[source]

Generate a linearly spaced threshold grid.

Raises:

ValueError – If count is less than 1.

Return type:

None

__init__(thresholds_range=<factory>, start=0.0, end=1.0, count=10)
Parameters:
Return type:

None

class pysatl_cpd.benchmark.online.noreset.thresholds.ranges.AutoThresholdsRange(thresholds_range=<factory>, count=2)[source]

Bases: ThresholdsRange

Threshold range resolved later by an external analyzer.

Variables:

count – Desired number of thresholds.

Parameters:
count: int = 2
__post_init__()[source]

Validate count and leave thresholds empty for later resolution.

Return type:

None

__init__(thresholds_range=<factory>, count=2)
Parameters:
Return type:

None