Giter Site home page Giter Site logo

frr's Introduction

Food Recipe Recommender using Neural Matrix Factorization

Food lovers and home cooks are constantly seeking inspiration and guidance to elevate their culinary journeys. A recipe recommender system can offer tailored suggestions based on individual preferences, dietary restrictions, and available ingredients. By catering to the unique needs of users, the application can provide immense value by enhancing their cooking experiences and expanding their culinary horizons. In this project, we aim to build this recommender in neural network based matrix factorization.

Dataset

The dataset used is “Food.com Recipes and Interactions” consists of 180K+ recipes and 700K+ recipe reviews covering 18 years of user interactions and uploads on Food.com, obtained from Kaggle: https://www.kaggle.com/datasets/shuyangli94/food-com-recipes-and-user-interactions. RAW_recipies.csv and RAW_interactions.csv files were from the dataset.

Architecture

The model architecture is inspired from Neural Collaborative Filtering paper https://arxiv.org/abs/1708.05031

Required Packages

  • tqdm: for progress bar
  • matplotlib: for plotting
  • torch (PyTorch): for deep learning
  • Pillow: for image loading
  • pandas: for csv data handling
  • scikit-learn: to provide various metric functions
  • beautifulsoup4

Install

Using Nvidia GPU (Cuda 11.8), Trained and Tested with CUDA

pip3 install tqdm matplotlib Pillow scikit-learn pandas beautifulsoup4 torch --extra-index-url https://download.pytorch.org/whl/cu118

Using CPU Only:

Although, you can use CPU Only, it would take longer time to train!

pip3 install tqdm matplotlib Pillow scikit-learn pandas beautifulsoup4 torch 

Directory Structure

Place all the files in same directory as the following:

├─── data/          contains csv data files
├─── datasets/      contains custom dataset classes
├─── models/        contains recommender models
├─── utils/         contains helper functions
├─── results/       contains metrics results
├─── NeuralMF.pt    trained model weights for NeuralMatrixFactorization
├─── demo.ipynb     jupyter notebook run the demo 
├─── train.py       for train the recommender model
└─── recommender.py for recommendation functions

Running Demo

To run the demo, please run the following Jupyter Notebook: demo.ipynb

** Recommend using VSCode https://code.visualstudio.com for running the demo notebook

frr's People

Contributors

mshenoda avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.