Repo for Machine learning course INT3305E, Fall 2023 project in Predicting Movie genres from Title, Poster and User rating data.
├── dataset
code to visualize and preprocessing data
├── model
main models implementation
├── saved_models
contains trained models
├── utils
utility functions
main.py : main file to run the project
model_config.yaml : config file for models
pip install -r requirements.txt
-
Arguments parsing
To select the models to be used and other training hyperparameters, parsing arguments to main.py. Use
python main.py --help
to print the list of arguments and their default values and descriptions.
To change models hyperparameters, edit
model_config.yaml
file. -
Training
To train the models, use
python main.py train --title_model <titleModelName> --poster_model <posterModelName> --urating <userRatingsModelName> --checkpoint <checkpointFileName>
For example, for training the top score model, use
python main.py train --title_model LSTM --poster_model DenseNet169 --urating_model FNN --use_dropped_data False --batch_size 32 --image_size 256 --max_epochs 20 --checkpoint lstm_den169_fnn_nodrop
-
Testing
To test the models, use
python main.py test --title_model <titleModelName> --poster_model <posterModelName> --urating <userRatingsModelName> --checkpoint <checkpointFileName>
For example, for testing the top score model, use
python main.py test --title_model LSTM --poster_model DenseNet169 --urating_model FNN --use_dropped_data False --batch_size 32 --image_size 256 --max_epochs 20 --checkpoint lstm_den169_fnn_nodrop
Notebook file for training and testing models: [ml-project.ipynb]