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.
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
- scraped recipes from the net, including ones including the term "cookie" and some other chosen terms,
- used the ingredient lists as input to principal component analysis to reduce the dimensionality of the problem,
- 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.
Get the MATLAB code
Published with MATLAB® R2017b
1 CommentsOldest to Newest
Many years ago I implemented an audio-enhanced version of the card game popularly known as ‘Memory’ (aka ‘Pairs’, or ‘Concentration’): a large figure window opens up and initially displays 2*n magenta rectangles (‘cards’), each of them being associated with a sound snippet (characteristic of our lab) and occluding graphs of the time series and frequency power spectrum of that sound snippet. When the user clicks on a rectangle, the sound is played and the rectangle made invisible, revealing the graphs. The player’s task is to find matching pairs. Upon success, the matching pair of cards remain ‘open’ (rectangle invisible, graphs visible), otherwise they are ‘closed’ again. Primarily a birthday present back then, it also served me to rehearse the basics of GUI programming outside the GUIDE framework. I’m considering tailoring it to kids in terms of sounds (think crunching cookie etc.) and licenses (make it a standalone application). Deploying code as standalone applications may soon become relevant for my work, so I’m happy to rehearse & play.