Skip to main content

Streamlined anomaly detection system for time series data

Project description

SpotAnomaly

Streamlined anomaly detection system for time series data with dual training paradigms (batch and online learning).

Requirements

  • Python 3.10 or higher
  • uv package manager (recommended)

Installation

Using uv (Recommended)

Install uv:

# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

# Homebrew
brew install uv

# Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

Set up the project:

uv sync

This command automatically installs Python 3.11, creates a virtual environment, and installs all dependencies.

Using pip

python3.11 -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -e .

Usage

Configuration

Choose your training paradigm in config/default.yaml:

model:
  paradigm: "batch"  # or "online"
  • batch: Traditional batch training with sklearn/LightGBM (faster, trains once)
  • online: Streaming online learning with river (incremental updates)

Running the Pipeline

Run all steps a first time:

uv run python -m src all

Run all steps but skip the download:

uv run python -m src all --skip-download

Or run individual steps:

uv run python -m src process  # Process raw data
uv run python -m src train    # Train forecasting models
uv run python -m src detect   # Detect anomalies

Run predictions with a pre-trained model:

uv run python -m src all --predict-only --model 20251229_172126

Viewing the result

You can explore, chart, and analyze the processed and modeled data interactively in notebooks/analyze_combined.ipynb.

Running live mode

uv run python -m src live --interval 5

Then open the live report

Development

Install with development dependencies:

uv sync --all-extras

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spotanomaly2-2.1.1.tar.gz (421.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spotanomaly2-2.1.1-py3-none-any.whl (158.9 kB view details)

Uploaded Python 3

File details

Details for the file spotanomaly2-2.1.1.tar.gz.

File metadata

  • Download URL: spotanomaly2-2.1.1.tar.gz
  • Upload date:
  • Size: 421.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for spotanomaly2-2.1.1.tar.gz
Algorithm Hash digest
SHA256 44c972cfe1f0f8c73da4f06eb6ea0f265401e4cf5691b67b8dd22c9b6af4e2ee
MD5 0c68c7378b7ffe7829e2cab44d549c1e
BLAKE2b-256 1d02023552c9a7a00d321ac00900da595fb722da872bb4b1e9f251b3a91eb529

See more details on using hashes here.

Provenance

The following attestation bundles were made for spotanomaly2-2.1.1.tar.gz:

Publisher: release.yml on sequential-parameter-optimization/spotanomaly2

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spotanomaly2-2.1.1-py3-none-any.whl.

File metadata

  • Download URL: spotanomaly2-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 158.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for spotanomaly2-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 41545ad62556d2386eea44b981e6bb4fa60e672527d8ce7f06654ae49d70ebb1
MD5 e98124042a96e8ee5b7407364eb15752
BLAKE2b-256 1c3c8ff46d5ae95c720a69f7828d8d375d3de66997e9fda9c50a93d660b2b509

See more details on using hashes here.

Provenance

The following attestation bundles were made for spotanomaly2-2.1.1-py3-none-any.whl:

Publisher: release.yml on sequential-parameter-optimization/spotanomaly2

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page