by selimfirat
Streaming anomaly detection in Python: 50+ online multivariate and univariate detectors (LODA, RRCF, Half-Space Trees, xStream, DAMP, SAND) with calibrated alerts, drift handling, and prequential evaluation.
# Add to your Claude Code skills
git clone https://github.com/selimfirat/pysadpysad is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by selimfirat. Streaming anomaly detection in Python: 50+ online multivariate and univariate detectors (LODA, RRCF, Half-Space Trees, xStream, DAMP, SAND) with calibrated alerts, drift handling, and prequential evaluation. It has 322 GitHub stars.
pysad's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/selimfirat/pysad" and add it to your Claude Code skills directory (see the Installation section above).
pysad is primarily written in Python. It is open-source under selimfirat on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh pysad against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
Batch detectors train on a fixed dataset. Streaming detectors update as points arrive, without waiting for a complete dataset. PySAD provides a common interface for scoring and learning from each point across both multivariate and univariate streams, including streams with concept drift. More than 60 publications on Google Scholar cite it, and 30+ public repositories on GitHub use it.
Every detector learns from and scores one point at a time with fit_partial, score_partial and fit_score_partial. Most detectors keep a bounded window, sketch, or set of trees rather than the full stream history.
Covers multivariate and univariate streams: robust/seasonal statistics (MAD, SeasonalHybridESD, FluxEV), forests and sketches (LODA, HalfSpaceTrees, RobustRandomCutForest, RSHash, xStream), subsequences (DAMP, MatrixProfile, SAND), graphs (MIDAS), and 10 drift monitors (ADWINMeter, PageHinkleyMeter, DriftAdaptiveDetector).
ConformalProbabilityCalibrator, extreme-value SPOTProbabilityCalibrator, and GaussianTailProbabilityCalibrator normalize arbitrary raw scores onto a [0, 1] scale, paired with ThresholdFilter and QuantileFilter for binary alerts.
evaluate_stream, ArrayStreamer, PandasStreamer, PolarsStreamer, and CSVStreamer replay streams without loading everything into memory, while AUROCMetric, AUPRMetric, and WindowedMetric update per point across 17 labeled ODDS datasets, 58 NAB series, and ULB credit-card fraud.
Chain preprocessing, projections, log parsing (DrainLogParser), detection, postprocessing, and calibration with |, combine detectors with &, and attribute anomalous features with LODA.explain_partial().
Wrap any PyOD detector on a sliding window (ReferenceWindowModel), drop PySAD detectors into River (PySADToRiverAdapter) or scikit-learn (PySADToScikitLearnAdapter) pipelines, score River forecasters (PredictiveAnomalyDetector), or expose any PySAD detector through CapyMoa's streaming interface without installing CapyMoa or Java (PySADToCapyMoaAdapter).
Batch outlier detectors such as PyOD can score new points after training, but need retraining to update what they have learned. General online learning frameworks such as River and CapyMOA treat anomaly detection as one module among many (and CapyMOA requires Java). PySAD is built specifically for streaming anomaly detection: fast pure-NumPy/SciPy detectors, pipeline composition, score calibration, drift handling, and prequential evaluation in one lightweight package.
pip install pysad
Or with Conda / Mamba / Pixi:
conda install -c conda-forge pysad
PySAD supports Python 3.11 to 3.14 on Linux, macOS and Windows. The core detectors need no optional extras or JVM.
To install the latest development version from master:
pip i