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.0.tar.gz (421.2 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.0-py3-none-any.whl (158.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: spotanomaly2-2.1.0.tar.gz
  • Upload date:
  • Size: 421.2 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.0.tar.gz
Algorithm Hash digest
SHA256 0debe9fcebb12189745fbd669bcae018d44117e1146de344d4f269ecee46404a
MD5 e47bfc261362575355faa55a9d117650
BLAKE2b-256 a5971deddf5465b02431e7e3912214d2cbabbb481dbbc4d0e3597061d68e87c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for spotanomaly2-2.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: spotanomaly2-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 158.7 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 448dc38be3dea751372077b17e88624380f7655af35e8885bb40ea83096db642
MD5 006e01c5bcd4f4de262c5ae47b6a2bca
BLAKE2b-256 e48cad575b536468a23254717fb435de8461476ca21f7390453e1b990bc8ba19

See more details on using hashes here.

Provenance

The following attestation bundles were made for spotanomaly2-2.1.0-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