How facebookresearch/kats works
Main Components Identification
The system should be divided into these major components:
a) Core Components:
• Time Series Data Handler (kats/consts.py)
• Data Management Layer (kats/data/)
• Compatibility Layer (kats/compat/)
b) Functional Modules:
• Detectors Module
• Models Module
• TSFeatures Module
• Utils Module
• Graphics Module
• Evaluation Module
┌─────────────────────────────────────────────────────────┐
• Client Applications │
• ┘
• ↓
┌─────────────────────────────────────────────────────────┐
• Kats Core Layer │
• ┌─────────────┐ ┌──────────────┐ ┌──────────────┐ │
• TimeSeriesData│ │Data Manager │ │Compatibility │ │
• ┘ └──────────────┘ └──────────────┘ │
• ┘
• ↓
┌─────────────────────────────────────────────────────────┐
• Analysis Modules │
• ┌──────────┐ ┌────────┐ ┌──────────┐ ┌──────────────┐ │
• Detectors │ │Models │ │TSFeatures│ │Evaluation │ │
• ┘ └────────┘ └──────────┘ └──────────────┘ │
• ┘
• ↓
┌─────────────────────────────────────────────────────────┐
• Support Modules │
• ┌──────────┐ ┌───────────┐ ┌──────────────┐ │
• Graphics │ │Utils │ │Metrics │ │
• ┘ └───────────┘ └──────────────┘ │
• ┘
Component Details
• Core Components (Blue rectangles)
• TimeSeriesData: Central data structure
• Data Manager: Handles data I/O and validation
• Compatibility Layer: Manages dependencies
• Analysis Modules (Green rectangles)
• Detectors: Anomaly and changepoint detection
• Models: Forecasting models (Prophet, ARIMA, etc.)
• TSFeatures: Feature extraction
• Evaluation: Performance metrics
• Support Modules (Orange rectangles)
• Graphics: Visualization tools
• Utils: Helper functions
• Metrics: Measurement tools
Integration Points
External integration with:
• Prophet
• Scikit-learn
• Pandas
• StatsModels
Notes Section
Notes about:
• Minimal installation options
• Key dependencies
• Extension points
• Testing framework integration