How amirgroup-codes/gfast works
Project Type and Purpose
• This project implements an efficient algorithm (GFast) for computing sparse Fourier transforms of generalized q-ary functions. It is research-driven software that includes not only the core algorithm but also multiple experiment pipelines (for GFP experiments, synthetic data, and a tutorial) to evaluate the algorithm on different data sets.
• The project is structured as a Python module (gfast) with separate directories for experimental implementations and results. The README also mentions a paper and a tutorial notebook, which indicate that the repository is meant to be both a reusable algorithm library and an experimental/testbed platform.
Analyzing the File Structure & Identifying Main Components
• Core Algorithm (gfast folder):
– Contains modules like gfast.py (likely the main algorithm implementation), along with helper classes and methods such as input_signal.py, lasso.py, query.py, reconstruct.py, spright.py, and utility functions in utils.py.
– This is the “engine” folder that implements the core sparse Fourier transform algorithm.
• Experiment Pipelines:
– gfp_exp: Houses code (including shell scripts and experiments) for running NR-GFast on data related to the multilayer perceptron (MLP) and the avGFP protein experiment. It includes a model subdirectory with a protein sequence file, a pretrained model (mlp.pt), and model weights.
– synt_exp: Contains code and scripts for running tests on synthetic data. This will be important when isolating synthetic experiment configurations from the core algorithm.
– tutorial: The Jupyter notebook (tutorial.ipynb) and associated results folder demonstrate how to run the algorithm and serve as an example-driven overview of the system.
• Results and Supporting Files:
– gfp_results, synt_results, and tutorial_results folders: These store outputs from the various experimental runs.
– figures.ipynb not only generates figures for the paper but also serves as a visualization aid, so it can be thought of as a supplementary component.
– environment.yml and .gitignore provide configuration and version control utility.