Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 7 additions & 29 deletions ads/opctl/operator/lowcode/anomaly/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,13 @@ spec:
meta:
description: "The model to be used for anomaly detection"

contamination:
required: false
default: 0.1
type: float
meta:
description: "Fraction of training dataset corresponding to anomalies (between 0.0 and 0.5)"

model_kwargs:
type: dict
required: false
Expand All @@ -293,33 +300,4 @@ spec:
meta:
description: "preprocessing and feature engineering can be disabled using this flag, Defaults to true"

time_budget:
type: float
required: false
default: 0
meta:
description: "Time budget for optimization in seconds, defaults to 0 which means no limit & optimization continues till convergence."

training_ratio:
type: float
required: false
default: 0.7
meta:
description: "Ratio of data to be used for training, rest of the data is used for validation. defaults to 0.7"

false_alarm_ratio:
type: float
required: false
default: 0.01
meta:
description: "False alarm ratio is the ratio of the expected anomaly in the train dataset, defaults to 0.01"

metric:
type: string
required: false
default: F1_MACRO
allowed:
- F1_MACRO
- unsupervised_unify95
- unsupervised_unify95_log_loss
type: dict
3 changes: 2 additions & 1 deletion tests/operators/anomaly/test_anomaly_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

MODELS = ["automlx", "autots"] # , "auto", "tods",


# Mandatory YAML parameters
TEMPLATE_YAML = {
"kind": "operator",
"type": "anomaly",
Expand Down Expand Up @@ -126,6 +126,7 @@ def test_artificial_small(model):
yaml_i["spec"]["model"] = model
yaml_i["spec"]["input_data"]["url"] = input_data
yaml_i["spec"]["output_directory"]["url"] = output_dirname
yaml_i["spec"]["contamination"] = 0.3

with open(anomaly_yaml_filename, "w") as f:
f.write(yaml.dump(yaml_i))
Expand Down