Loren on the Art of MATLAB

Turn ideas into MATLAB


Loren on the Art of MATLAB has been retired and will not be updated.

When is a Baked Good a Cookie?

This is one time of the year when there is often an abundance of baked goods showing up in my office, and many others no doubt. And you hear people say things like, "That's the best cookie I ever had!". And sometimes a debate ensues.

One problem, of course, is that not all cookies are good. Another is not all baked goods are cookies. Hmmm, there must be some math that could help us out here.


Quantifying "Cookieness"

A colleague just pointed out a thread on Reddit where there is a discussion about cookies, and which ones are best. In an effort to resolve the intense debate, one employee analyzed recipes to determine which ones qualify as a cookie.


To do so, the author

  1. scraped recipes from the net, including ones including the term "cookie" and some other chosen terms,
  2. used the ingredient lists as input to principal component analysis to reduce the dimensionality of the problem,
  3. applied clustering algorithms and and support vector machines to distinguish between pastries and cookies


The conclusion reached - some very tasty tarts did not quality for best cookie! Do you use MATLAB recreationally? To learn new concepts that might not yet be relevant for your work, but you are curious about? We'd love to hear your ideas here.

Published with MATLAB® R2017b

  • print
  • send email