How adigoryl/spectraflow works
SpectraFlow is a 1D NMR feature-selection and classification research framework. The documented workflow preprocesses spectra through wavelet denoising and PCA binning, then runs cross-validated feature selection and model evaluation, producing selected-feature and learning-progress visualizations. The repository also contains reconstruction and parallel experiment runners. Several links rely on the SOURCE INDEX or README rather than complete source excerpts, so uncertain internal sequencing is omitted.
Main entry points: parallel_spectraflow.py Parallel runner · preprocess_control.py Preprocess control · MLPSequentialAttention.py Attention MLP · spectraflow_reconstruction.py Reconstruction runner
Components 20
Spectra preprocessing
- Raw spectra
datasets/vasoplegia/CPMG.csv - Wavelet denoising
preprocessing/WaveletDenoise.py - PCA binning
preprocessing/PCABinning.py - Preprocess control
preprocessing/preprocess_control.py - Prepared spectra
datasets/vasoplegia/preprocessed/cpmg_db1__bin005_overlap0025.csv
Experiment workflows
- Fold preparation
pipeline/DataHandler.py - Parallel runner
pipeline/parallel_spectraflow.py - SpectraFlow runner
pipeline/spectraflow.py - Reconstruction runner
pipeline/spectraflow_reconstruction.py
Selection and models
- Feature selector
pipeline/FeatureSelector.py - LOORFE elimination
pipeline/LOORFE.py - Attention MLP
models/MLPSequentialAttention.py - Sequential attention
models/SequentialAttention.py - Base MLP
models/MLP.py - Evaluation MLP
models/MLPEval.py - Legacy selectors
models/old_models/mlp_sparse.py
Evaluation and views
- Learning progress plots
plots/live_learning.py - Selected-feature spectra
plots/ppm_selected.py - Analysis plots
plots/plots.py
Other components
- Researcher
Connections 23
- Researcher → Preprocess control: runs preprocessing
README.md - Researcher → Parallel runner: runs analysis
README.md - Raw spectra → Preprocess control: provides spectra
- Preprocess control → Wavelet denoising: applies denoising
preprocessing/preprocess_control.py - Preprocess control → PCA binning: applies binning
preprocessing/preprocess_control.py - Preprocess control → Prepared spectra: writes processed data
- Parallel runner → Fold preparation: prepares folds
pipeline/parallel_spectraflow.py - Fold preparation → Prepared spectra: reads CSV data
pipeline/DataHandler.py - Parallel runner → Feature selector: runs selection
pipeline/parallel_spectraflow.py - Parallel runner → Evaluation MLP: evaluates models
pipeline/parallel_spectraflow.py - Parallel runner → Attention MLP: uses selection model
pipeline/parallel_spectraflow.py - Parallel runner → LOORFE elimination: runs elimination
pipeline/parallel_spectraflow.py - Parallel runner → Selected-feature spectra: plots selected features
pipeline/parallel_spectraflow.py - SpectraFlow runner → Attention MLP: uses selection model
pipeline/spectraflow.py - SpectraFlow runner → Legacy selectors: supports legacy selector
pipeline/spectraflow.py - Reconstruction runner → Attention MLP: uses selection model
pipeline/spectraflow_reconstruction.py - Reconstruction runner → Evaluation MLP: evaluates model
pipeline/spectraflow_reconstruction.py - Reconstruction runner → Learning progress plots: plots training progress
pipeline/spectraflow_reconstruction.py - Reconstruction runner → Selected-feature spectra: plots selected features
pipeline/spectraflow_reconstruction.py - Attention MLP → Sequential attention: weights features
models/MLPSequentialAttention.py - Attention MLP → Base MLP: inherits from
models/MLPSequentialAttention.py - Feature selector → Learning progress plots: uses callback
pipeline/FeatureSelector.py - LOORFE elimination → Learning progress plots: uses callback
pipeline/LOORFE.py