This project studies music from two directions. The classification module compares MFCC+SVM and ResNet18 baselines with an Audio Spectrogram Transformer for multi-label genre recognition on FMA-Medium. The forecasting module uses a 30-year window, LSTM/RNN models, and Gaussian mixture clustering to model year-level changes in audio features from 1921 onward.
genre_classification/contains the reviewed split tables, precomputed MFCC arrays, baseline notebook, AST and ResNet18 training code, and result figures.trend_prediction/contains yearly feature aggregation, LSTM and RNN training, evaluation, recursive prediction, and GMM clustering scripts.- The reviewed course report records AST Sample F1
0.60and Macro F10.34on FMA-Medium. It records overall normalized MSE0.106for the LSTM and0.146for the RNN baseline.
The metrics above were checked against the report and notebook outputs, but the full GPU training runs were not repeated during repository cleanup. The yearly label-generation script was rerun against the retained source snapshot and matched the original 100-row output exactly.
Python 3.10 was used for the original environment. Create a virtual
environment and install the dependencies:
python -m venv .venv
.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
pip install -r requirements.txtFor a CUDA build of PyTorch, use the command generated by the PyTorch installation selector before installing the remaining requirements.
For classification, download fma_metadata.zip and fma_medium.zip from the
FMA project, then extract them to
genre_classification/data/fma_metadata/ and
genre_classification/data/fma_medium/. Run commands from the source folder:
cd genre_classification/src
jupyter notebook mfcc_svm_baseline.ipynb
python train_ast_windows.py
python train_resnet.pyUse train_ast_linux.py instead of the Windows entry point on Linux.
For trend prediction, download data.csv from
Spotify-Data 1921-2020,
save it as trend_prediction/raw.csv, and run:
cd trend_prediction
python label_generation.py
python train_baseline.py
python baseline_pred.py
python train_generalized_lstm.py
python generalized_predict.pygeneralized_predict.py evaluates years with known labels, recursively predicts
later years, and fits GMM clusters for interpretation.
The repository does not include FMA audio or the Spotify feature dataset. FMA
metadata is CC BY 4.0, while individual audio tracks retain the licenses
selected by their artists. The Spotify source page does not specify a license,
so its raw data, derived labels, and trained artifacts are excluded. See
DATA_SOURCES.md for the exact boundaries.
Project source and documentation use the MIT License. The unmodified
FMA helper module keeps its original MIT notice under third_party/.

