• Stars
    star
    221
  • Rank 179,773 (Top 4 %)
  • Language
    Jupyter Notebook
  • License
    MIT License
  • Created almost 8 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

πŸ”

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/

Usage

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 [email protected]: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

Visualization & embedding exploration tools

# run t-sne and make the plots for the ingredient embeddings
jupyter notebook ./src/plot_ingredients_recipes.ipynb

Embedding plot.ly plots to host them yourself

https://gist.github.com/altosaar/67d8456ad28acd1abb497f1950d8de8a

Contributing

Pull requests and all feedback welcome! Please file an issue if you run into problems replicating the results.

Ideas on next steps

  • get more data
  • convert jupyter notebook for plotting into one python script
  • write scripts to figure out the right vocabulary
  • fit a better model (e.g. multi-class regression in pytorch) -- if you manage to get better results than the live demo at https://altosaar.github.io/food2vec/ just submit a pull request with the new assets/data/wordVecs.js and I'll happily update it :)
  • compare the above model embeddings to the current embeddings
  • make the UI of the website more user-friendly and mobile-friendly

Acknowledgments

Thanks to Anthony for open-sourcing a javascript embedding browser -- the one here is heavily based on it.

More Repositories

1

variational-autoencoder

Variational autoencoder implemented in tensorflow and pytorch (including inverse autoregressive flow)
Python
1,134
star
2

jaan.io

A Retina-ready Jekyll-powered blog with responsiveness, SEO, etc.; up at https://jaan.io
HTML
55
star
3

hierarchical-variational-models-physics

Hierarchical variational models for physics.
Jupyter Notebook
18
star
4

proximity_vi

This code accompanies the proximity variational inference paper.
Python
18
star
5

deep-exponential-families-gluon

Deep exponential family models in MXNet/Gluon. Layers o' latents πŸ’€
Python
17
star
6

sentence_word2vec

word2vec with a context based on sentences.
Python
15
star
7

american-community-survey

American Community Survey data on people and households
Jupyter Notebook
15
star
8

gamma-variational-autoencoder

Deep Latent Gamma Model / Gamma VAE
Python
13
star
9

couchometer

Instead of classifying activity, this app does one thing: tells you how much you sit based on accelerometer data.
Java
8
star
10

thesis

Altosaar, Jaan (2020). Probabilistic Modeling of Structure in Science: Statistical Physics to Recommender Systems. Ph.D. Thesis, Princeton University.
TeX
7
star
11

vimco_tf

VIMCO in tensorflow.
Python
5
star
12

exploring_american_community_survey_data

Using the Census Bureau's American Community Survey data with `dbt` (data build tool) for creating compressed parquet files for exploratory data analysis and downstream applications.
Jupyter Notebook
5
star
13

rankfromsets

RankFromSets - SDSS submission code for reproducibility.
HTML
4
star
14

vae-lstm

Variational autoencoder LSTMs for time series data.
Python
4
star
15

citibike-stats

Calculating CitiBike personal statistics for the community leaderboard πŸ“ˆ 🚴
Jupyter Notebook
4
star
16

gmm_cpp

Gaussian mixture model implementation in C++ with black box variational inference and control variates
C++
3
star
17

overleaf-curriculum-vitae-resume-cv-template

TeX
3
star
18

dotfiles

Dotfiles - main development environment is vim + tmux or emacs
Python
3
star
19

language-model-notebooks

Quickstart for interacting with language models and APIs via a notebook-like interface
Jupyter Notebook
2
star
20

nomen

🐐 Lightweight configuration trees with command line flags 🐐
Python
2
star
21

ctpf

User-artist-song Poisson Factorization
Python
2
star
22

physical-monotile-printing

1
star
23

jaan.li

Personal website using Observable Framework
JavaScript
1
star
24

new-york-real-estate

Jupyter Notebook
1
star
25

user-artist-song-poisson-factorization

TeX
1
star
26

CumulantExpander

Automated expansions of Hamiltonian cumulants for analyzing Monte Carlo simulations.
1
star