Giter Site home page Giter Site logo

cuisine_transformation's Introduction

Cuisine_Transformation

Cuisine_Transformation

Data is a property of Complex Systems Lab IIITD hence not available in the repo.
Word2Vec used to vectorize recipes in the Encoder-Decoder model.
Scoring Scheme - Output Ingredient gets +1 if its category matches with Input Ingredient. So the score for the recipe becomes the average of the individual score and the final score is the average of recipe scores.
To tackle the cuisine transformation problem, two different models were used.

  1. Encoder-Decoder - Similar to the model used in this paper, a Bi-GRU was used as an encoder while the decoder comprised of 2 GRU's. The initial state of the decoder was set to the final state of the encoder. From the list of ingredients for every recipe, 3 random ingredients were removed and those 3 were put into the output. The cuisine name was also given as input after being one hot enoded. This made the train test data for the project. Different variations of the model were tried like making 3 different decoders for the 3 ingredients to be predicted or adding attention to the encoding layer. Various dropout combinations were tried but all of them gave similar results which were averaging to 25% accuracy according to our scheme with only ~20 unique words being predicted.

  2. RoBERTa - builds on BERT which is a self-supervised pretraining technique that learns to predict intentionally hidden (masked) sections of text. Using the same configuration as Roberta, a model was trained on the vocabulary of our dataset. Instead of 3 ingredients only 1 random ingredient was removed and reserved as output. As no additional input could be given, every cuisine would need a specific model so only Italian and the Middle East were tried to evaluate the performance. This model performed significantly better in terms of unique words - around 300 for Italian and 120 for the Middle East. But the prediction accuracy was still ~22%.

Drawbacks/ Potential Issues - This problem is a subproblem os the AI recipe generation problem and it would be better if it was a tackle with that perspective rather than considering it an NLP problem. If ingredient flavor molecules could be known and quantified, they would possibly act as great features for such a problem. Also, when the previous issues are dealt with, issues with the scoring criteria would also be solved because currently for a prediction to be correct an additive must always be replaced by an additive and so on for other categories.

cuisine_transformation's People

Contributors

bhavaygg avatar

Watchers

James Cloos avatar  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.