Claude/traffic data diffusion model 01 agm qi pr web ef4bj n cu ge no#32
Open
Yongying-Zhu wants to merge 2 commits intoAI4HealthUOL:mainfrom
Conversation
This commit implements a novel implicit-explicit diffusion model for time series
imputation on the LD2011_2014 dataset.
Key Features:
- Implicit feature extraction using multi-scale dilated causal convolutions
- Explicit feature extraction using S4 state space models
- Fusion of implicit and explicit features for improved performance
- Support for training and evaluation at multiple missing ratios (20%-80%)
New Files:
1. src/imputers/ImplicitExplicitDiffusion.py
- Core model implementation with detailed Chinese comments (750 lines)
- ImplicitFeatureExtractor: Multi-scale dilated convolutions
- ExplicitFeatureExtractor: S4 state space model
- Residual blocks with feature fusion
2. src/data_loader_ld2011.py
- Data loading and preprocessing for LD2011_2014 dataset (260 lines)
- Flexible data parsing (semicolon/tab/comma separators)
- Automatic normalization and outlier handling
- Sliding window sequence generation
3. src/train_ld2011.py
- Training script with support for different missing ratios (350 lines)
- Automatic checkpoint saving and recovery
- Training loss visualization
- Multi-GPU support
4. src/evaluate_ld2011.py
- Evaluation script calculating MAE and RMSE metrics (450 lines)
- Support for single/multiple missing ratio evaluation
- Automatic visualization of imputation results
- CSV format evaluation report
5. src/config/config_ImplicitExplicit_LD2011.json
- Configuration file for LD2011 dataset experiments
- Diffusion config: T=200, beta_0=0.0001, beta_T=0.02
- Model config: 14 channels, 256 res_channels, 36 layers
- Implicit module: dilation_rates=[1,2,4,8,16]
- Explicit module: S4 lmax=100, d_state=64
6. run_experiments.sh
- Automated experiment script (200 lines)
- Complete pipeline: preprocessing -> training -> evaluation
- GPU status checking and error handling
- Colored output and progress tracking
7. README_ImplicitExplicitDiffusion.md
- Comprehensive documentation (1500 lines)
- Project overview and architecture explanation
- Environment setup guide
- Three-level hyperparameter tuning guide:
* Basic: learning rate, batch size, iterations
* Intermediate: model capacity (channels, layers)
* Advanced: module architecture (dilation rates, S4 parameters)
- Code structure and detailed explanation
- FAQ (10 common questions)
8. QUICKSTART.md
- 5-minute quick start guide (400 lines)
- Environment installation steps
- Data preparation guide
- Training and evaluation examples
- Quick troubleshooting
9. PROJECT_SUMMARY.md
- Project implementation summary
- Code statistics and highlights
- Learning objectives achievement
- Technical stack and key techniques
Code Quality:
- Every line of code has detailed Chinese comments
- Modular design with clear separation of concerns
- Three-tier documentation: code comments + quickstart + detailed README
- Support for three learning levels:
* Basic: Hyperparameter tuning
* Intermediate: Module architecture adjustment
* Advanced: Diffusion model optimization
Target Metrics (from paper):
- 20% missing: MAE 0.272, RMSE 0.389
- 30% missing: MAE 0.297, RMSE 0.424
- 40% missing: MAE 0.334, RMSE 0.477
- 50% missing: MAE 0.378, RMSE 0.540
- 60% missing: MAE 0.450, RMSE 0.655
- 70% missing: MAE 0.541, RMSE 0.776
- 80% missing: MAE 0.732, RMSE 1.049
Total: ~4000 lines of code and documentation
Tested: Code syntax validated, ready for deployment testing
- check_environment.py: Comprehensive environment validation script - setup_config.sh: Automated setup wizard for data path and GPU configuration - config_ImplicitExplicit_LD2011_QuickTest.json: Quick test config (5000 iters, smaller model) - INSTALLATION_GUIDE.md: Complete installation and usage guide for AnYujin environment These tools help users: - Verify all dependencies are correctly installed - Automatically configure data paths and GPU settings - Run quick tests before full training - Follow step-by-step installation instructions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.