Skip to content

🍔 Repo for "Personalized Recipe Recommendation Using Heterogeneous Graphs" (2023)

Notifications You must be signed in to change notification settings

nickthegroot/recipe-recommendation

Repository files navigation

Personalized Recipe Recommendation Using Heterogeneous Graphs

Authors:

  • Nicholas DeGroot (Halıcıoğlu Data Science Institute, UC San Diego)

Description

This project was created for UCSD's DSC 180: Data Science Capstone. According to the university, the course:

Span(s) the entire lifecycle, including assessing the problem, learning domain knowledge, collecting/cleaning data, creating a model, addressing ethical issues, designing the system, analyzing the output, and presenting the results.

https://catalog.ucsd.edu/courses/DSC.html#dsc180b

Getting Started

This project is configured with devcontainer support. This automatically creates a fully isolated environment with all required dependencies installed.

The easiest way to get started with devcontainers is through GitHub Codespaces.

  1. Click here to create a new codespace on this repository.
    • Alternatively, this can be done through the gh CLI.
  2. Configure the codespace to your liking. We recommend the 8-core machine.
  3. Start the codespace and connect. It might take a minute to install all the dependencies. Grab a ☕!
  4. Connect to the codespace through your preferred method (browser / VS Code).

Testing

This project is setup with an array of tests using pytest to ensure things are working. With a working environment, run the following command.

make test

Testing on DSLMP

For UCSD students & staff, we've ensured that everything works on the Data Science Machine Learning Platform servers.

The (auto!) published Docker image contains everything you need to test the project. Under the hood, it's running the same container that any devcontainer is.

In DSMLP: log in with your credentials, then run the following:

launch.sh -s -i ghcr.io/nickthegroot/recipe-recommendation:main
cd /app
make test

This will begin a full run of every test in the project. Currently, this includes a full pipeline test and a smaller data processing test.

Downloading/Preparing the Data

  1. Download the data by creating an Kaggle account and downloading the shuyangli94/food-com-recipes-and-user-interactions dataset.
  2. Unzip the data into data/raw.
    • You should see a number of files, including data/raw/RAW_interactions.csv and data/raw/RAW_recipes.csv
  3. Run make data to clean the data into its cleaned form.

Running

All models can be trained using python src/cli/train.py.

  • Run python src/cli/train.py --help for all configuration options
  • In general, all models can be trained via python src/cli/train.py --model {model}
    • For example, LightGCN is trained with python src/cli/train.py --model LightGCN

About

🍔 Repo for "Personalized Recipe Recommendation Using Heterogeneous Graphs" (2023)

Resources

Stars

Watchers

Forks

Packages