This repository contains the files of the project Song Genre and Hit Prediction. The structure of this repository with all the files are present in the ee660_project_dirtree document.
- Run the
download_models.shscript to download the models. - Execute the
main.pyfile with optional arguments as shown below to construct the dataset or to train the models.
- The
main.pyfile calls the appropriate file for performing the respective function. For example, if the user input an argument for constructing the dataset, then thedataset_constructor.pyfile is executed. - Same is the case for the file
train.pywhich trains the models with the dataset constructed in the previous step
- The primary function of
main.pyis to run the trained models downloaded in step 1 on the validation data to perform model selection based on their performance. To do this, themain.pyfile executesvalidation.pywhich evaluates and selects the best model based on the evaluation. - The objective is to see how well a model can generalize its predictions, and this is done by
test.pyfile which themain.pyfile executes to evaluate the models on unseen out of sample data.
Step 1:
$ bash download_models.shStep 2: To construct the dataset:
$ python3 main.py -c TrueTo train the models on previously constructed datasets:
$ python3 main.py -t TrueTo construct the dataset and train the models on the newly constructed datasets:
$ python3 main.py -c True -t TrueStep 3: To validate the models and choose the best model and evaluate its performance:
$ python3 main.pyThe evaluation results will be displayed on the command line directly, and the intermediate and final results with the evaluation metrics will be stored in the results directory.
Additionally the constructed datasets before feature extraction are provided in the data_files.tar.gz compressed file