Otava Test Data
Test data generators and Visualization for Apache Otava change point detection.
Web Visualizer
The package includes an interactive web visualizer for exploring test patterns and comparing change point detection results against ground truth.

Features:
Generate and visualize 17 different test patterns
Compare three analysis methods: Otava (statistical), Moving Average, and Boundary detection
View accuracy metrics (precision, recall, F1 score)
Adjust parameters in real-time and see results instantly
Tutorial mode with detailed explanations for all generators and methods
Multiple Change Points
Detect multiple successive changes in your data:

Variance Changes
Detect changes in data volatility even when the mean stays constant:

Starting the Visualizer
pip install otava-test-data[web]
# Start the web server
otava-web
# Or with invoke tasks
inv web-start
Then open http://127.0.0.1:8100 in your browser.
Installation
pip install otava-test-data
Or with all optional dependencies:
pip install otava-test-data[all]
Quick Start
from otava_test_data import step_function, noise_normal, combine
# Generate a step function (single change point) with realistic noise
step = step_function(length=500, value_before=100, value_after=120)
noise = noise_normal(length=500, mean=0, sigma=5)
combined = combine(step, noise)
# Export to CSV for Otava analysis
combined.to_csv("test_data.csv")
# Access ground truth change point information
for cp in combined.change_points:
print(f"Change at index {cp.index}: {cp.description}")
Available Generators
Basic Building Blocks
Generator |
Description |
|---|---|
|
Constant value: |
|
Normal distribution: |
|
Uniform distribution: |
|
Single anomaly: |
|
Single change point: |
|
Temporary regression: |
Advanced Patterns
Generator |
Description |
|---|---|
|
Oscillation between two values |
|
Constant mean, changing variance |
|
Phase shift in periodic signal |
|
Multiple consecutive step changes |
CLI Tool
# Generate test suite
otava-gen generate --output-dir ./test_data --lengths 50 500 --seed 42
# List available generators
otava-gen list
# Get info about a generator
otava-gen info step_function
Contents
- Web Visualizer
- Time Series Generators
- API Reference
TimeSeriesbanding()combine()constant()multiple_changes()noise_normal()noise_uniform()outlier()phase_change()regression_fix()step_function()variance_change()ChangePointTimeSeriesconstant()noise_normal()noise_uniform()outlier()regression_fix()step_function()banding()multiple_changes()multiple_outliers()multiple_variance_changes()phase_change()variance_change()CombinationGeneratoradd_noise()combine()generate_test_suite()
- Benchmark Guide
- Development