classification
No-reset classification metrics (TP, FP, FN, precision, recall, F1, report).
- class pysatl_cpd.benchmark.online.noreset.metrics.classification.NoResetTotalTPMetric(*, error_margin, policy)[source]
Bases:
NoResetMultipleRunMetric[StateT,ProviderT,int],GenericNo-reset total true positive metric.
- Parameters:
error_margin (
tuple[int,int]) – (Left, right) tolerance around the true change point.policy (
BisegmentPolicyBase[TypeVar(StateT, bound=OnlineAlgorithmState),TypeVar(ProviderT, bound=LabeledData[Any,Any])]) – Bisegment policy defining true-region detection rules.
- class pysatl_cpd.benchmark.online.noreset.metrics.classification.NoResetTotalFPMetric(*, error_margin, policy)[source]
Bases:
NoResetMultipleRunMetric[StateT,ProviderT,int],GenericNo-reset total false positive metric.
- Parameters:
error_margin (
tuple[int,int]) – (Left, right) tolerance around the true change point.policy (
BisegmentPolicyBase[TypeVar(StateT, bound=OnlineAlgorithmState),TypeVar(ProviderT, bound=LabeledData[Any,Any])]) – Bisegment policy defining false-region detection rules.
- class pysatl_cpd.benchmark.online.noreset.metrics.classification.NoResetTotalFNMetric(*, error_margin, policy)[source]
Bases:
NoResetMultipleRunMetric[StateT,ProviderT,int],GenericNo-reset total false negative metric.
- Parameters:
error_margin (
tuple[int,int]) – (Left, right) tolerance around the true change point.policy (
BisegmentPolicyBase[TypeVar(StateT, bound=OnlineAlgorithmState),TypeVar(ProviderT, bound=LabeledData[Any,Any])]) – Bisegment policy defining true-region detection rules.
- class pysatl_cpd.benchmark.online.noreset.metrics.classification.NoResetPrecisionMetric(*, error_margin, tp_policy, fp_policy)[source]
Bases:
NoResetDerivedMetric[StateT,ProviderT,Number,float],GenericNo-reset precision metric with independently configurable TP/FP policies.
- Parameters:
error_margin (
tuple[int,int]) – (Left, right) tolerance around the true change point.tp_policy (
BisegmentPolicyBase[TypeVar(StateT, bound=OnlineAlgorithmState),TypeVar(ProviderT, bound=LabeledData[Any,Any])]) – Policy used for the true-positive source metric.fp_policy (
BisegmentPolicyBase[TypeVar(StateT, bound=OnlineAlgorithmState),TypeVar(ProviderT, bound=LabeledData[Any,Any])]) – Policy used for the false-positive source metric.
- __init__(*, error_margin, tp_policy, fp_policy)[source]
- Parameters:
tp_policy (BisegmentPolicyBase[StateT, ProviderT])
fp_policy (BisegmentPolicyBase[StateT, ProviderT])
- Return type:
None
- class pysatl_cpd.benchmark.online.noreset.metrics.classification.NoResetRecallMetric(*, error_margin, tp_policy, fn_policy)[source]
Bases:
NoResetDerivedMetric[StateT,ProviderT,Number,float],GenericNo-reset recall metric with independently configurable TP/FN policies.
- Parameters:
error_margin (
tuple[int,int]) – (Left, right) tolerance around the true change point.tp_policy (
BisegmentPolicyBase[TypeVar(StateT, bound=OnlineAlgorithmState),TypeVar(ProviderT, bound=LabeledData[Any,Any])]) – Policy used for the true-positive source metric.fn_policy (
BisegmentPolicyBase[TypeVar(StateT, bound=OnlineAlgorithmState),TypeVar(ProviderT, bound=LabeledData[Any,Any])]) – Policy used for the false-negative source metric.
- __init__(*, error_margin, tp_policy, fn_policy)[source]
- Parameters:
tp_policy (BisegmentPolicyBase[StateT, ProviderT])
fn_policy (BisegmentPolicyBase[StateT, ProviderT])
- Return type:
None
- class pysatl_cpd.benchmark.online.noreset.metrics.classification.NoResetF1Metric(*, error_margin, precision_metric, recall_metric)[source]
Bases:
NoResetDerivedMetric[StateT,ProviderT,float,float],GenericNo-reset F1 metric derived from no-reset precision and recall metrics.
- Parameters:
error_margin (
tuple[int,int]) – (Left, right) tolerance around the true change point.precision_metric (
NoResetPrecisionMetric[TypeVar(StateT, bound=OnlineAlgorithmState),TypeVar(ProviderT, bound=LabeledData[Any,Any])]) – Pre-configured no-reset precision metric.recall_metric (
NoResetRecallMetric[TypeVar(StateT, bound=OnlineAlgorithmState),TypeVar(ProviderT, bound=LabeledData[Any,Any])]) – Pre-configured no-reset recall metric.
- __init__(*, error_margin, precision_metric, recall_metric)[source]
- Parameters:
precision_metric (NoResetPrecisionMetric[StateT, ProviderT])
recall_metric (NoResetRecallMetric[StateT, ProviderT])
- Return type:
None
- class pysatl_cpd.benchmark.online.noreset.metrics.classification.NoResetClassificationReport(*, error_margin, global_policy, precision_policy=None, recall_policy=None)[source]
Bases:
NoResetDerivedMetric[StateT,ProviderT,Number,dict[str,Number]],GenericNo-reset classification report with one global policy and optional policy overrides.
- Parameters:
error_margin (
tuple[int,int]) – (Left, right) tolerance around the true change point.global_policy (
BisegmentPolicyBase[TypeVar(StateT, bound=OnlineAlgorithmState),TypeVar(ProviderT, bound=LabeledData[Any,Any])]) – Default policy applied to all source metrics.precision_policy (
Optional[BisegmentPolicyBase[TypeVar(StateT, bound=OnlineAlgorithmState),TypeVar(ProviderT, bound=LabeledData[Any,Any])]]) – Optional override policy for precision and its TP/FP bases.recall_policy (
Optional[BisegmentPolicyBase[TypeVar(StateT, bound=OnlineAlgorithmState),TypeVar(ProviderT, bound=LabeledData[Any,Any])]]) – Optional override policy for recall and its TP/FN bases.
- __init__(*, error_margin, global_policy, precision_policy=None, recall_policy=None)[source]
- Parameters:
global_policy (BisegmentPolicyBase[StateT, ProviderT])
precision_policy (BisegmentPolicyBase[StateT, ProviderT] | None)
recall_policy (BisegmentPolicyBase[StateT, ProviderT] | None)
- Return type:
None