How-to guides¶
Choose a guide for the task you need to complete. These guides assume familiarity with the score-then-learn loop in Getting started. For background, see Concepts. For parameters and method signatures, see API reference.
Score a stream point by point, measure AUROC, and raise alerts.
Stream CSV files, DataFrames, sensor values, messages and benchmark datasets.
Compare and choose a dataset, and list each pysad.utils.Data loader with its source, license, checksum and label format.
Find candidate detectors for your data and compare them.
Calibrate scores, choose a threshold and keep anomalies out of the model.
Normalize forecast residuals and calibrate them with ConformalTSFMCalibrator.
Choose a metric, follow performance over time and report stable results.
Choose a running statistic, bound its memory and window it over recent values.
Troubleshoot streaming edge cases
Diagnose installation problems and odd scores: cold start, constant streams, NaN or infinite values.
Add preprocessing, projections, postprocessing and ensembles.
Detect drift and keep learning
Reset a detector on drift and chain stages into one pipeline.
Detect anomalies in seasonal series
Find anomalies in metrics with a daily or weekly cycle.
Run a PyOD batch detector on a stream.
Start from historical data, save the state, run one detector per source and control the time per point.
Score Polars batches and PyFlink keyed streams, consume from Kafka or Redpanda, expose FastAPI endpoints, and checkpoint state to disk or Redis.
Run PySAD in streaming engines and ML libraries
Run PySAD detectors inside Bytewax, River, CapyMOA, scikit-learn, and scikit-multiflow without adding core dependencies.
Open and customize the pysad-live web or terminal dashboard to watch streaming scores and alerts as points arrive.
Run pysad-live with authentication and multiple tenants
Bind pysad-live to localhost, add a reverse proxy with authentication, and run one isolated dashboard per tenant.
Implement the model interface for a published streaming method and add it to PySAD.
Run, monitor, and harden the PySAD MCP server to expose detectors and drift meters to AI assistants.
Configure pysad-live, pysad.mcp, and the optional PyO3 kernels in one place.
Complete scripts that run end to end.
Migration guides¶
Migrate from Azure AI Anomaly Detector and Metrics Advisor
Replace retired Azure AI Anomaly Detector and Metrics Advisor in Python.
Migrate from AWS Lookout for Equipment and Kinesis RCF
Replace AWS Lookout for Equipment and Kinesis RANDOM_CUT_FOREST with PySAD.
Migrate from unit8co Darts to PySAD
Move from unit8co Darts whole-series forecasting scores to PySAD streaming detection.
Migrate from Salesforce Merlion
Migrate anomaly detection pipelines from archived Salesforce Merlion.
Migrate from Alibi Detect (BSL 1.1) to PySAD (BSD 3-Clause)
Move from BSL 1.1 Alibi Detect to permissive BSD 3-Clause PySAD.
Migrate from StatsForecast and Nixtla to PySAD
Replace StatsForecast and Nixtla batch forecasts with PySAD streaming pipelines.
Map ADTK batch rule-based and statistical detection to PySAD streaming detection.
Move from PyOD batch detection to PySAD prequential streaming detection.
Translate River streaming anomaly detection to PySAD streaming detection.