Skip to content
Recipe Timer Lab

COMP30027 Machine Learning · University of Melbourne · 2021

How long will it take to cook this?

In 2021 our team trained classifiers to guess whether a Food.com recipe is quick, medium or slow from its name, ingredients and method. The code was lost, so this site rebuilds the whole study from the report, reruns it on public data and lets you test it on your own recipes.

Training recipes
40,000
Classes
3
Models
5

Recipe card · live prediction

Slow cooker pulled pork

Slow

pork shoulder, brown sugar, smoked paprika, garlic powder, onion…

  • Quick3.6% Quick
  • Medium6.5% Medium
  • Slow89.8% Slow

Words that tipped it

  • hours
  • slow cooker
  • slow
  • pork
  • cooker
Paste your own

The brief

What the coursework asked

Project 2 of COMP30027 gave pairs a sample of Food.com recipes and asked them to build, compare and explain supervised classifiers for preparation time.

Ingredients

The data

Each recipe came with its name, ingredient list, method steps and their counts, plus staff-made text encodings: Doc2Vec vectors and bag-of-words matrices.

Method

The task

Predict one of three labels, then write a conference-style report on why each model behaves the way it does. Pairs had to build at least three models, one of them a stacking ensemble.

Chef's note

The catch

Only 5% of recipes are slow. A model can score well while barely ever saying “slow”, so accuracy alone hides the hardest class.

  • Quickon the table in under 35 minutes
  • Medium35 minutes to 4 hours
  • Slowmore than 4 hours, often overnight

Results

2021 report against the 2026 rebuild

The rebuild reruns the report's five models with the same features and settings on a public copy of Food.com, sampled to the report's exact class counts. 10 of the 11 findings the report draws carry over, including the model ranking. The exception: the C curve peaking at C = 1. The scores come out lower, because the recipes, labels and Doc2Vec vectors are not the staff's.

Five-fold CV

Cross-validated accuracy

  • 2021 report
  • 2026 rebuild
SettingAccuracy2021 → 2026
Gaussian Naive Bayes350 Doc2Vec features0.6255 → 0.5422
Logistic Regression350 Doc2Vec features0.7201 → 0.6780
SVM350 Doc2Vec features0.7302 → 0.7128
Random ForestSteps bag of words0.7885 → 0.7661
Stacked Naive BayesGNB + LR + SVM labels0.7297 → 0.7103
Report figures come from Table 4, or are implied by the confusion matrices where the report gave no table entry (LR, stack).

Best model, rebuilt (Random Forest)

76.6%

Report: 78.9% · 15 repeated folds: 76.5% (76.1% to 76.9%) · 10,000 unseen recipes: 76.4% (75.5% to 77.2%). Intervals are 95%.

Stacking against its best ingredient

71.0%

SVM alone: 71.3%. Paired over 15 folds the stack scores −0.4 pts against the SVM (−0.6 to −0.2 pts), so like 2021, stacking does not help.

Every table and confusion matrix

Explore

Six ways in

About this project

Then and now

2021

The coursework

Subject
COMP30027 Machine Learning
University
The University of Melbourne
When
2021 Semester 1, Project 2
Team
Sunchuangyu (Rin) Huang and a project partner
Original stack
Python, scikit-learn, staff Doc2Vec and CountVectorizer features, Kaggle in-class competition

2026

The revival

Pipeline
Python 3.12 with uv, scikit-learn and gensim, rebuilt from the report
Web
Next.js, TypeScript, Tailwind CSS, hand-drawn SVG charts
In the browser
TF-IDF, Logistic Regression, Naive Bayes and the stacking judge, ported to TypeScript and tested
Rigour
Repeated cross-validation, intervals, McNemar tests and calibration, checked against SciPy and R
AI, optional
Bring-your-own-key LLM evaluation with an audit log that stays in your browser
Code
Private GitHub repository (available on request)

More on provenance, credits and academic integrity on the about page.