Rethinking-Anomaly-Detection icon indicating copy to clipboard operation
Rethinking-Anomaly-Detection copied to clipboard

This pull request introduces a series of improvements and code cleanups across multiple files, focusing on code style consistency, module import order, and enhanced documentation for the BWGNN implementation

Open tg12 opened this issue 2 months ago • 1 comments

This pull request introduces a series of improvements and code cleanups across multiple files, focusing on code style consistency, module import order, and enhanced documentation for the BWGNN implementation. The most important changes include a new, detailed README_FIXED.md documenting critical bug fixes and usage, consistent code style and import ordering, and improved clarity in dataset and training procedures.

Documentation and Usability Improvements

  • Added a comprehensive README_FIXED.md that explains critical issues fixed in the BWGNN implementation, including Laplacian computation, wavelet normalization, heterogeneous graph processing, training/eval separation, threshold selection, parameter registration, and batch dimension handling. It also provides installation, usage, configuration, testing, architecture, mathematical details, performance, file structure, logging, and reproducibility information.

Code Style and Import Order

  • Standardized import ordering and formatting in BWGNN.py, main.py, and dataset.py to improve readability and maintainability. This includes grouping standard libraries, third-party libraries, and local modules, and using consistent quotation marks. [1] [2] [3]

Dataset Handling and Feature Processing

  • Improved dataset loading and feature processing in dataset.py: consistent use of double quotes, clearer logic for anomaly injection, and more robust handling of graph node features and labels.

Training and Evaluation Clarity

  • Refactored the training loop and evaluation metrics in main.py for clarity and consistency. This includes improved mask handling, clearer metric calculation, and more readable output formatting. [1] [2] [3] [4] [5]

Minor Code Quality Improvements

  • Enhanced code style in Laplacian and wavelet computation functions in BWGNN.py, including better formatting, clearer variable naming, and consistent use of double quotes. [1] [2] [3] [4]

tg12 avatar Nov 15 '25 14:11 tg12