category

anomaly_detector_common

Shared predicates for anomaly detector learning defaults, threshold-based prediction, baseline training-data selection, dataset helpers, and export.

Availability:
logtalk_load(anomaly_detection_protocols(loader))
Author: Paulo Moura
Version: 1:0:0
Date: 2026-05-01
Compilation flags:
static
Implements:
Extends:
public options
Uses:
Remarks:
(none)

Public predicates

(no local declarations; see entity ancestors if any)

Protected predicates

anomaly_detector_diagnostics_data/2

Hook predicate that importing anomaly detector implementations may override in order to expose diagnostics and metadata for learned detectors.

Compilation flags:
static
Template:
anomaly_detector_diagnostics_data(AnomalyDetector,Diagnostics)
Mode and number of proofs:
anomaly_detector_diagnostics_data(+compound,-list(compound)) - one

anomaly_detector_export_template/2

Hook predicate that importing anomaly detector implementations must define in order to expose the exported detector predicate template for a given functor.

Compilation flags:
static
Template:
anomaly_detector_export_template(Functor,Template)
Mode and number of proofs:
anomaly_detector_export_template(+atom,-callable) - one

anomaly_detector_term_template/2

Hook predicate that importing anomaly detector implementations must define in order to expose the learned detector term template used by pretty-printing helpers.

Compilation flags:
static
Template:
anomaly_detector_term_template(AnomalyDetector,Template)
Mode and number of proofs:
anomaly_detector_term_template(+compound,-compound) - one

dataset_attributes/2

Collects the dataset attribute declarations as Attribute-Values pairs.

Compilation flags:
static
Template:
dataset_attributes(Dataset,Attributes)
Mode and number of proofs:
dataset_attributes(+object_identifier,-list(pair)) - one

check_examples_non_empty/2

Checks that a dataset contains at least one example.

Compilation flags:
static
Template:
check_examples_non_empty(Dataset,Examples)
Mode and number of proofs:
check_examples_non_empty(+object_identifier,+list) - one

baseline_training_examples/3

Collects training examples selected by the baseline_class_values/1 and baseline_selection_policy/1 options. The reject policy throws an error when non-baseline examples are present. The filter policy removes non-baseline examples and throws an error when no baseline examples remain.

Compilation flags:
static
Template:
baseline_training_examples(Dataset,Examples,Options)
Mode and number of proofs:
baseline_training_examples(+object_identifier,-list,+list(compound)) - one

valid_baseline_class_values/1

Checks that a baseline_class_values/1 option value is a non-empty list of distinct atoms.

Compilation flags:
static
Template:
valid_baseline_class_values(BaselineClassValues)
Mode and number of proofs:
valid_baseline_class_values(+list(atom)) - one

extract_scores/2

Transforms Score-Id-Class tuples into the public Id-Class-Score representation.

Compilation flags:
static
Template:
extract_scores(Pairs,Scores)
Mode and number of proofs:
extract_scores(+list,-list) - one


Private predicates

(no local declarations; see entity ancestors if any)

Operators

(none)