tw.anomaly_detection.detect
tw.anomaly_detection.detect(dataset=pandas.DataFrame,model=dict)
Detect anomalies using a previously built model. Submits a detection job, polls until it completes, and returns the detection results together with job metadata.
Parameters
dataset : pandas.DataFrame
Time-series data on which anomaly detection is performed.
model: dict
A trained anomaly-detection model (as returned by method: “build_model”).
Returns
dict
A dictionary with keys:
"id" – job identifier (str).
"results" – detection results as a :class:`pandas.DataFrame`.
"status" – final job status response (dict).
Example Usage
anomaly_detection_detect_response = tw.anomaly_detection.detect(
model = anomaly_detection_build_model_model,
dataset = dataset
)
Example Output
anomaly_detection_detect_id = anomaly_detection_detect_response['id']
anomaly_detection_detect_results = anomaly_detection_detect_response['results']
anomaly_detection_detect_status = anomaly_detection_detect_response['status']