object
lof_anomaly_detector
Local Outlier Factor anomaly detector with multiple distance metrics, mixed-feature support, and missing-value handling. Learns from baseline training examples selected from a dataset object implementing the anomaly_dataset_protocol protocol and returns a detector term that can be used for scoring, prediction, and export.
Availability:
logtalk_load(lof_anomaly_detector(loader))Author: Paulo Moura
Version: 2:0:1
Date: 2026-11-11
Compilation flags:
static, context_switching_callsRemarks:
(none)
Inherited public predicates:
anomaly_detector_options/2 check_anomaly_detector/1 check_option/1 check_options/1 default_option/1 default_options/1 diagnostic/2 diagnostics/2 export_to_clauses/4 export_to_file/4 learn/2 learn/3 option/2 option/3 predict/3 predict/4 print_anomaly_detector/1 score/3 score_all/3 valid_anomaly_detector/1 valid_option/1 valid_options/1
Public predicates
(no local declarations; see entity ancestors if any)
Protected predicates
(no local declarations; see entity ancestors if any)
Private predicates
extract_values/3
Extracts feature values in the declared attribute order.
Compilation flags:
staticTemplate:
extract_values(Attributes,AttributeValues,Values)Mode and number of proofs:
extract_values(+list(atom),+list(pair),-list) - one_or_errorExceptions:
A declared attribute is absent from
AttributeValues:existence_error(attribute,Attribute)check_feature_values/2
Checks prepared numeric, categorical, and missing feature values.
Compilation flags:
staticTemplate:
check_feature_values(FeatureTypes,Values)Mode and number of proofs:
check_feature_values(+list(atom),+list) - one_or_errorExceptions:
A bound feature value in
Values is not a ground term:instantiation_errorA numeric feature value is not a number:
type_error(number,Value)A categorical feature value is not an atom:
type_error(atom,Value)check_instance_ids/2
Checks distinct integer identities for training examples.
Compilation flags:
staticTemplate:
check_instance_ids(Instances,Seen)Mode and number of proofs:
check_instance_ids(+list,+list(integer)) - one_or_errorExceptions:
An example identifier in
Instances is not a ground term:instantiation_errorAn example identifier is not an integer:
type_error(integer,Id)An example identifier occurs more than once:
domain_error(unique_example_id,Id)Operators
(none)