food2vec – Augmented cooking with machine intelligence
food2vec – Augmented cooking with machine intelligence
2016
Overview
名前の通り、word2vecの考え方を、料理の材料に当てはめたもの.
Technology/System
word2vecで、ある単語の持つ意味は前後の文章に出てくる単語のもつ意味と深い関係があるという前提のもとに、単語を表現する高次元のベクトルを推定するモデルを学習するのと同様に、同じレシピの中で使われているということを手掛かりに数千ある食べ物の材料を100次元のベクトルに次元削減 embeddingする.
インタラクティブなデモは95896のレシピを用いて、2,087の材料を100次元のベクトルにembeddingしたもの (最終的にはT-SNEで2次元に落としている)
Results
word2vecでは、$$(king) – (man) + (woman) = (queen) $$という式がそれぞれの単語を表すベクトル同士の関係として成立したというのが有名だが、今回のfood2vecでも同じような式が成り立ったという.
[latex](bacon) – (egg) + (orangejuice) = (coffee)[/latex]
[latex](butter) – (bread) + (roast beef) = (sage)[/latex]
(なんだかわかったようなわからないような…)
Links
- デモ
- 記事
GitHub - altosaar/food2vec
Food vectors. Live demo at https://altosaar.github.io/food2vec/, blog post with more information and plots here: https://jaan.io/food2vec-augmented-cooking-machine-intelligence/ Train a model on the recipes dataset, replicate the results from the blog post: conda env create -f environment.yml conda activate food2vec git clone git@github.com:altosaar/food2vec.git echo "[submodule \"src/sentence_word2vec\"] path = src/sentence_word2vec url = https://github.com/altosaar/sentence_word2vec.git git submodule update --init cd food2vec/src ./run_fasttext.sh # run t-sne and make the plots for the ingredient embeddings jupyter notebook ./src/plot_ingredients_recipes.ipynb https://gist.github.com/altosaar/67d8456ad28acd1abb497f1950d8de8a Pull requests and all feedback welcome!
github.com