How ywjawmw/smgcn-torch-master works
Project type and purpose
• This is a PyTorch-based machine-learning pipeline implementing SMGCN (a graph convolution-based recommendation model).
• It supports two domains: a traditional Herb–Symptom recommendation dataset and a NetEase bundle–item dataset.
• The goal is to train the SMGCN model, evaluate it on test splits, and dump ranking metrics to the output folder.
File structure
• Top-level scripts and configs:
• smgcn_main.py – the entry point for training & evaluation
• SMGCN.sh – shell wrapper to launch experiments
• README.md – usage, dataset specs, dependency list
• Data directory:
• data/Herb – preprocessed Herb/symptom train/test/valid sets and mappings
• data/NetEase – preprocessed user–bundle–item interactions and size metadata
• model directory:
• model/SMGCN.py – PyTorch module defining the SMGCN architecture (graph conv layers, forward pass)
• utils directory:
• load_data.py – builds adjacency matrices and feature tensors from raw text files
• helper.py, utils.py, batch_test.py – evaluation routines, metric computations, negative sampling
• parser.py – hyperparameter search space and argument parsing
• output/result directories:
• output/Herb – result files (.result-*) for Herb experiments
• result (if used) – catch-all for other domains or future extensions
README for additional insights
• Lists required Python packages and versions
• Describes how to run training with python smgcn_main.py
• Details the format of every dataset file, so you know how load_data constructs inputs
Detail without over-splitting
• Layer of abstraction (data loader vs. model vs. trainer).
• Don’t feel obliged to split every helper function—focus on logical components.
• Non-trivial step (e.g., construction of the symptom–herb bipartite graph).