Giter VIP home page Giter VIP logo

mohannishant6 / recipe-ingredients-as-word-embeddings Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 1.0 8.55 MB

Can we use Word Embeddings to improve accuracy in cuisine classification? Check out this application of NLP.

Home Page: https://towardsdatascience.com/embedding-contexts-into-recipe-ingredients-709a95841914

Jupyter Notebook 100.00%
natural-language-processing word-embeddings classification cuisines recipe-ingredients

recipe-ingredients-as-word-embeddings's Introduction

Embedding Contexts into Recipe Ingredients

Read my article for greater explanation: https://towardsdatascience.com/embedding-contexts-into-recipe-ingredients-709a95841914

Tree-based methods and ANNs have successfully been applied to predict the type of cuisine using a list of ingredients. Converting the ingredient list to a simple bag-of-words matrix, which is essentially a one-hot-encoded matrix, gives a prediction of accuracy of 78% on the Yummly recipes dataset.

Can we use Word Embeddings to improve those results?

In this work, we use Gensim's Word2Vec implementation to convert a given list of ingredients to a fixed-length vector representation. Let's see how those vectors look: snap

A cleaned recipe list and context vector representation gives classification accuracy of only 65%, which is lower than the baseline 78%. Let's look in detail at some cuisines and their top ingredients, shall we? snap

So, since the predition accuracy fell from 78% to 65%, is Word-Embedding bad?

Probably. Probably Not. There are caveats. For starters, the dataset has imbalanced classes. Possibly, a more thorough (or maybe less thorough?) cleaning of data is needed. Maybe the vectors built by Gensim need more tuning.

Anyway, getting poor results is also good research, right?

recipe-ingredients-as-word-embeddings's People

Watchers

 avatar  avatar  avatar

Forkers

devrohaan

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.