Change Point Detection Algorithm Selection Guide¶
This guide helps users select the most appropriate change point detection algorithm for network measurement time series analysis. All algorithms are specifically designed and tuned for RTT (Round-Trip Time) measurements and network congestion detection.
š Available Algorithms¶
1. Ruptures (Default - Recommended)¶
Algorithm: ruptures
Description: State-of-the-art change point detection using the ruptures library with multiple kernel functions.
Strengths: - Fast and accurate - Multiple kernel options (RBF, L1, L2, Normal) - Well-tested and maintained - Good performance on various data types - Configurable penalty parameters
Best for: - Network monitoring in production environments - Large RTT datasets (>1000 measurements) - Real-time congestion detection - When you need reliable, fast results for network analysis
Configuration:
change_point_detection:
algorithm: "ruptures"
threshold: 0.25
ruptures_model: "rbf" # Options: "rbf", "l1", "l2", "normal"
ruptures_penalty: 10.0 # Higher = fewer change points
CLI Usage:
jitterbug analyze data.csv --algorithm ruptures --threshold 0.25
2. Bayesian Change Point (BCP)¶
Algorithm: bcp
Description: Classical Bayesian approach using Student-t likelihood and constant priors.
Strengths: - Probabilistic framework - Good theoretical foundation - Handles uncertainty well - Works well with small datasets
Weaknesses: - Slower than ruptures - Requires external dependency - Less configurable
Best for: - Network research and analysis - When you need probabilistic confidence in congestion detection - Small to medium RTT datasets (<500 measurements) - Academic studies requiring theoretical interpretability
Configuration:
change_point_detection:
algorithm: "bcp"
threshold: 0.25
min_time_elapsed: 1800
CLI Usage:
jitterbug analyze data.csv --algorithm bcp --threshold 0.25
šÆ Algorithm Selection Matrix¶
| Criteria | Ruptures | BCP |
|---|---|---|
| Speed | āāāāā | āāā |
| Accuracy | āāāāā | āāāā |
| Ease of Use | āāāāā | āāāā |
| Interpretability | āāāā | āāāāā |
| Configurability | āāāāā | āāā |
| Memory Usage | āāāā | āāāāā |
| Dependencies | āāāā | āāā |
š Detailed Algorithm Comparison¶
Performance Characteristics¶
| Algorithm | Time Complexity | Space Complexity | Min RTT Points |
|---|---|---|---|
| Ruptures | O(n log n) | O(n) | 10 |
| BCP | O(n²) | O(n) | 5 |
Parameter Sensitivity¶
Ruptures Parameters¶
- ruptures_model:
"rbf": Radial Basis Function (default, good for most cases)"l1": L1 norm (good for sparse changes)"l2": L2 norm (good for gradual changes)"normal": Normal distribution (good for Gaussian data)- ruptures_penalty: Controls number of change points (1-100, default: 10)
BCP Parameters¶
- threshold: Detection sensitivity (0.01-0.5, default: 0.25)
- min_time_elapsed: Minimum time between change points (seconds)
š Use Case Recommendations¶
Network Monitoring (Production)¶
Recommended: Ruptures with RBF kernel
change_point_detection:
algorithm: "ruptures"
ruptures_model: "rbf"
ruptures_penalty: 10.0
threshold: 0.25
Research & Analysis¶
Recommended: BCP for interpretability, Ruptures for speed
change_point_detection:
algorithm: "bcp" # or "ruptures"
threshold: 0.2 # More sensitive for research
Real-time Applications¶
Recommended: Ruptures with L2 kernel
change_point_detection:
algorithm: "ruptures"
ruptures_model: "l2"
ruptures_penalty: 15.0 # Fewer false positives
Noisy Data¶
Recommended: Ruptures with a higher penalty
change_point_detection:
algorithm: "ruptures"
ruptures_penalty: 20.0
threshold: 0.3 # Less sensitive
š ļø Configuration Examples¶
High Sensitivity (Detect More Change Points)¶
change_point_detection:
algorithm: "ruptures"
threshold: 0.15
ruptures_penalty: 5.0
min_time_elapsed: 900 # 15 minutes
Low Sensitivity (Detect Fewer Change Points)¶
change_point_detection:
algorithm: "ruptures"
threshold: 0.35
ruptures_penalty: 20.0
min_time_elapsed: 3600 # 1 hour
Balanced Configuration (Default)¶
change_point_detection:
algorithm: "ruptures"
threshold: 0.25
ruptures_penalty: 10.0
min_time_elapsed: 1800 # 30 minutes
š® Interactive Selection¶
Quick Selection Questions¶
- What's your primary goal?
- Fast, reliable detection ā Ruptures
-
Research/interpretability, or reproducing the paper ā BCP
-
What's your RTT dataset size?
- Small (<100 measurements) ā BCP
- Medium (100-1000 measurements) ā Ruptures
-
Large (>1000 measurements) ā Ruptures
-
What's your tolerance for false positives?
- Low (prefer fewer detections) ā Higher penalty/threshold
-
High (prefer more detections) ā Lower penalty/threshold
-
What are your computational resources?
- Limited ā Ruptures
- A few seconds of CPU per series is fine ā BCP
Decision Tree¶
RTT Dataset Size?
āāā Small (<100 measurements) ā BCP
āāā Medium (100-1000 measurements)
ā āāā Need interpretability? ā BCP
ā āāā Need speed? ā Ruptures
āāā Large (>1000 measurements)
āāā Reproducing the paper? ā BCP (under ten seconds for 1 500 points on CPU)
āāā Production monitoring? ā Ruptures
š” Best Practices¶
General Guidelines¶
- Start with Ruptures: It's fast, accurate, and well-tested
- Use BCP for research: When you need theoretical grounding
- Adjust sensitivity: Start with defaults, then fine-tune
Performance Optimization¶
- Large datasets: Use Ruptures with higher penalty
- Real-time: Use Ruptures with L2 kernel
- Batch processing: Any algorithm works well
- Memory constraints: Use BCP or Ruptures
Troubleshooting¶
- Too many change points: Increase penalty/threshold
- Too few change points: Decrease penalty/threshold
- Inconsistent results: Check data quality and preprocessing
- Slow performance: Switch to Ruptures or increase min_time_elapsed
š Example Configurations for Network Scenarios¶
Production Network Monitoring¶
change_point_detection:
algorithm: "ruptures"
ruptures_model: "rbf"
ruptures_penalty: 12.0
threshold: 0.25
min_time_elapsed: 1800 # 30 minutes
High-Frequency RTT Analysis¶
change_point_detection:
algorithm: "ruptures"
ruptures_model: "l2"
ruptures_penalty: 8.0
threshold: 0.2
min_time_elapsed: 300 # 5 minutes
Network Research Studies¶
change_point_detection:
algorithm: "bcp"
threshold: 0.15
min_time_elapsed: 600 # 10 minutes
š¬ Advanced Topics¶
Custom Algorithm Development¶
For advanced users who want to implement custom algorithms:
- Inherit from
BaseChangePointDetector - Implement the
detect()method - Return list of
ChangePointobjects - Register in
ChangePointDetector._create_algorithm()
Algorithm Evaluation¶
examples/algorithm_benchmark.py runs both detectors with several configurations on
the bundled dataset and writes an HTML report.
This guide should help you select the most appropriate algorithm for your specific use case and data characteristics.