A Hierarchical Multi-Method Time Series Correlation Analyzer
TRACES is a comprehensive framework for analyzing relationships between time series data using multiple correlation methods. It automatically determines the most appropriate correlation method(s) for each pair of series and provides detailed visualizations and analysis.
-
Clone the repository:
git clone https://github.com/SwiftyProjects/TRACES.git cd TRACES
-
Create the conda environment:
conda env create -f environment.yml conda activate traces-env
-
Launch Jupyter Lab:
jupyter lab
-
Open the notebook:
- Navigate to
notebooks/TRACES_ES.ipynb
- Run the example analysis using provided sample data
- Navigate to
See /docs/examples/
for complete example outputs including:
- Visualizations of correlation analyses
- Detailed results from each analysis step
- Sample data processing demonstrations
- Multi-method correlation analysis
- Pearson correlation
- Spearman rank correlation
- Kendall's Tau
- Cross-Correlation Function (CCF)
- Rolling window correlations
- Automatic relationship type classification
- Linear relationships
- Non-linear relationships
- Lagged relationships
- Complex relationships
- Confidence scoring system
- Advanced visualization suite
- Comprehensive statistical testing
- Parent-child relationship handling
- Excel file (.xlsx)
- First row: Column headers (series labels)
- First column: Time intervals
- Additional columns: Time series data
- Minimum 3 data points per series
- Numeric data only (except time labels)
-
Setup and Configuration
- Environment initialization
- Data loading and validation
- Parent-child relationship definition
-
Core Correlation Analysis
- Basic correlation calculations
- Significance testing
- Method comparison framework
-
Advanced Analysis
- Cross-correlation analysis
- Time-delayed correlations
- Rolling window analysis
-
Relationship Classification
- Type determination
- Confidence scoring
- Method recommendations
-
Visualization
- Correlation method comparisons
- Relationship matrix heatmaps
- Method performance analysis
- CCF and lag pattern visualization
-
Results Processing
- Comprehensive summary statistics
- Grouped relationship analysis
- Strength distribution reports
-
Correlation Analysis
- Basic correlations with significance tests
- Time-delayed correlation patterns
- Rolling correlation trends
- Cross-correlation results
-
Classification Results
- Relationship type identification
- Confidence scores
- Method recommendations
- Supporting metrics
-
Visualization Suite
- Interactive correlation comparisons
- Relationship type matrix (optimized for top
$N$ even-numbered pairs)- Includes strategic NaN visualization for unpaired relationships
- Highlights strongest relationship patterns effectively
- Method performance charts
- CCF pattern analysis
-
Summary Statistics
- Relationship type distribution
- Correlation strength metrics
- Confidence score analysis
- Method effectiveness summary
- Python 3.x
- Core libraries:
- pandas
- numpy
- scipy
- matplotlib
- seaborn
- Optimized for datasets with up to 1000's of pair comparisons
- Automatic handling of missing values
- Efficient parent-child relationship exclusion
- Scalable visualization components
-
User Guides:
-
Examples:
- Complete example outputs in /docs/examples/
- Sample datasets in /data/examples/
- Python 3.12+
- Conda or Miniconda
- See
environment.yml
for complete dependency list
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
If you use TRACES in your research, please cite:
@software{TRACES2024,
author = {SwiftyProjects},
title = {TRACES: Time-series Relationship Analysis with Comprehensive Evaluation Suite},
year = {2024},
publisher = {GitHub},
url = {https://github.com/SwiftyProjects/TRACES}
}