zondag 20 juli 2014

Food Pairs 101

What follows is a brief explanation of what our work with foodpairs is trying to do.  

Foodpairing is the theory that foodstuffs go well together if they share key chemical compounds. The ur example is Heston Blumenthal's combination of caviar and white chocolade that both contain high levels of amines. Some work has been done to turn bodies of recipes into frequency lists of foodpairs, creating an informal hierarchy of good taste. 

Here we don't buy into the theory of foodpairing, which is culturally specific anyway, but we are using its concept of a 'food pair'. Our interest is not culinary but historic: can the way cooks and cuisines combine ingredients, now and in the past, show affinities and differences. Can it illustrate larger historic explanations of how cuisines have developed.

The foodpairs for a Aloo Gobi recipe look like this:
A diagram of it looks like this, a network with all nodes connecting each other.

Here is a graph of the same aloo gobi but combined with those for a Lasagna recipe.

When graphing foodpairs for a larger body of recipes, a cookbook, some combinations will be more common than others, this is expressed with line-width and distance as this graph of a Madhur Jaffrey cookbook shows:

It seems reasonable to suggest that different cuisines will each have a preference for certain ingredients and when they use the same ones they will combine it differently. It also seems reasonable to expect that cuisines that developed together will differ less than cuisines that didn't. This is what we want to verify.

By combining the foodpairs of the Jaffrey book with a Mexican cookbook we get the graph below. It gives some information about their commonality but without context nothing definite can be said.
To make some real sense of the ways foodpairs show affinity across the culinary scale we need a metric. The Jaccard index is a simple way to calculate similarity in data-sets. When comparing two sets that are exactly alike (comparing the foodpairs of a book with the foodpairs of its unchanged reprint) it will score 1 -> 100% similarity. If they are completely different the score is 0. 

Using the same Mexican and Indian cookbook as above we can calculate the Jaccard index as 0.11- > of the 8135 unique foodpairs the books together yield, 11% are present in both books. Without context it is a useless number but now look at the graph below that compares the foodpairs from the Jaffrey cookbook with 13 other cookbooks covering a number of styles (national cuisine and celebrity chefs). 

The Jaccard index (in whole percentages) is mapped horizontally. The vertical scale gives the total number of unique foodpairs in both books. 

That Jaffrey compares most with another Indian cookbook gives us some comfort that we are not generating random data. Jaffrey comparing least with Rene Redzepi's NOMA cookbook feels right too. The theory that Mexican and Indian food share the same middle eastern influence is hard to corroborate with this, but it could be informing that it finds more commonality with Middle Eastern food (and Greek) than with anything else.

The next graph compares the Mexican cookbook with the same books. The highest similarities found are with a book by Nigella Lawson and with a book on Hawaiian food. Notice the position of the two Chinese cookbooks in the left corner for both graphs.

Note: saying that we are comparing cuisines is obviously not true. We are comparing English language cookbooks written for an audience of English speaking home cooks, explaining them the things they expect to be explained and with ingredients that can locally purchase. Which brings us to the unanswered question what a cookbook really represents. 
In any case: the problem of meaning here is endless and this stuff will explain nothing.

vrijdag 18 juli 2014

The Moscow Rules

The Moscow rules is the name for an informal protocol on how spies are to behave while undercover on alien territory. They are fake, it makes their psychogeographic crispness even higher.
  1. Assume nothing.
  2. Never go against your gut.
  3. Everyone is potentially under opposition control.
  4. Don't look back; you are never completely alone.
  5. Go with the flow, blend in.
  6. Vary your pattern and stay within your cover.
  7. Lull them into a sense of complacency.
  8. Don't harass the opposition.
  9. Pick the time and place for action.
  10. Keep your options open.

woensdag 16 juli 2014

Interactive bubble graph for ingredients in 13 cookbooks -> Jaccard index

Food pairing / gastronomy with a telescope [Part Two]

Earlier we have looked at the possibility of using foodpairs as a yardstick by which bodies of recipes can be compared for their (dis)similarity. The aim is to so look at cuisines in order to see how Asian cuisines differ from Western ones, how Asian cuisines differ internally and how the cuisines of the new world in turn relate to the ones from the old world.

This is interesting to pursue for the way it might corroborate larger historic explanations of how cuisines have developed. China developed in isolation much longer than any other civilization in the old world, is its cooking also more singular? India has been invaded several times and its food is very much a product of its own cultures clashing with its Muslim conquerors, does that make it stand out from the other Asian cuisines? Read Rachel Laudan's book Cuisine and Empire for the bigger historic picture.

In practice when using the word cuisine we are actually comparing English language books written for an audience of English speaking home cooks; an important difference. 

The number of foodpairs a recipe generates increases exponentially with the number of ingredients. A typical cookbook (and the ones we use here are all modest one) yields anywhere between 700 and 2500 pairs, the number of connections when comparing three books is large and a really meaningful way to visualize a foodpair comparison we have not yet found. Instead we have turned to using the Jaccard Index, a simple formula for comparing similarity in datasets.  If two book are absolutely similar (a book compared with itself) the index is 1, if the books are completely dissimilar the index is 0. So how higher the number how greater the similarity. Let's look at how Jamie Oliver's Naked Chef compares to 12 cookbooks representing many styles and cuisines.

The Horizontal line is most important as it shows the similarity (in %, Jaccard index*100) between Oliver and the book being compared. The vertical line gives the total number of unique foodpairs in both books. According to this Oliver is most similar to other UK TV chefs Nigella Lawson (27%) and Gordon Ramsay (34%). He is equally similar to books on French, Mexican, Brazilian and Greek food. He is least similar to the two Chinese cookbooks (8%). The fcat these two Chinese cookbooks are equally dissimilar is important: it shows they are themselves similar, as you would expect. 

Here is the graph comparing Vietnamese, Thai, Indian (Madhur Jaffrey) and two Chinese (one by Ken Hom) cookbooks. 

Indian/Chinese has the least similarity, Chinese/Chinese most but with 16% which puts perspective on the 34% similarity between Oliver and Ramsay.

Here is the graph comparing 13 cookbooks with each other, it is large to make it legible (click to enlarge). A rough guess is that 10-15% comparison is average. The 20+ similarity for UK celebrity chefs is striking but further work will have to decide how striking.

It is much easier to compare cookbooks on the presence of ingredients alone, there is much less data. When doing this for the same books as above the graph below is created. Or check here for a interactive one.The numbers are different, the Jaccard-index gets much higher (54% ingredient similarity between the top-scoring duo Ramsay and Oliver), but the overall shape of these two graphs is recognizably similar, especially when you factor in the difference in scale. This is good news because proper food pair data (recipe for recipe) is hard to create while creating ingredient lists for books is exactly what foodmap does.

zondag 13 juli 2014

IBM's FlavorBot

Twitter amigo Theun shared this article on Chef Watson IBM program for an AI constructing recipes.
The invite-only portal lets users enter ingredients, the type of food they want to prepare (a sandwich? a stir-fry?), and a “style” to prepare food in such as Indian or Austrian, and then automatically generates 100 recipes based on those parameters. One of the big advantages for Watson’s data scientists is that Bon Appetit presented them with a recipe database that was preformatted and quality tested, making IBM’s job easier.
 Of course they want it easy!

Another article gives us the above image of a recipe for a computer generated Indian Turmeric Paella. 

<Insert cynic quip>

Both articles suggest that big data firms are ready to quantify taste and flavor on a scale of "hedonic psychophysics" or "the psychology of what people find pleasant and unpleasant" in order to manipulate and sell it. 
To generate these food leads, if you will, AI cross references three databases of information:
  1. A recipe index containing tens of thousands of existing dishes that allows the system to infer basics like “what makes a quiche a quiche”
  2. Hedonic psychophysics, which is essentially a quantification of whether people like certain flavor compounds at the molecular level
  3. Chemoinformatics, which sort of marries these two other databases, as it connects molecular flavor compounds to actual foods they’re in
<Insert another cynic quip>

I might be sitting on a gold mine!

Another article gives 4+1 recipes generated by chef Watson. The compare-yr-recipe of these is like below. A nice, well demarcated, image showing each recipe as having its own well-defined ingredient-spectrum. So who is choosing what recipe to cook of the hundreds generated? As Gary Kasparov said about Deep Blue when he lost: It was the hand of God.

What IBM is shirking from using is the term food pairing, in the IBM Watson Cognitive Cooking Fact Sheet they prefer the idiotic term Cognitive Cooking. 
At the heart of this cognitive cooking system are a set of algorithms that draw upon a number of datasets, regional and cultural knowledge as well as statistical, molecular and foodpairing theories to come up with dishes that are high in surprise, pleasantness and pair well. The system begins by capturing and analyzing tens of thousands of existing recipes to understand ingredient pairings and dish composition, and which it rearranges and redesigns into new recipes. It then cross references these with dataon the flavor compounds found in ingredients, and the psychology of people’s likes and dislikes (hedonic perception theory) to model how the human palate might respond to different combinations of flavors.
This line from the same factsheet is of course complete bullshit:
IBM’s cognitive cooking system can reason about flavor the same way a human uses his palate.

woensdag 9 juli 2014

Spotting Bird Spotters

The Dutch site Waarneming.nl is a fantastic resource, avidly used by animal spotters of every kind imaginable. Its user-base is tremendous and in total more than 23 billion sightings are currentlyon record. I was just wondering if I could use some of that data and lacking an API I wrote a little screen scraper that collects name, date and GPS coordinates. I will never be able to collect it all (even if I wanted to) for the simple reason that Waarneming.nl grows faster than I can scrape it. Bloody hell!

As a bit of hobby I wrote an online-map page that shows snapshots of data and can show the geographic distribution of a large number of birdspecies. It won't shatter the earth but here are some screenshots of things I saw.

Somebody spotting birds and plant on a bike?

Cetti's zanger: a very specific habitat.
Great tit/Koolmees, very common but only 330+ sightings.
The raven.

donderdag 26 juni 2014

Spice in European Prehistoric Cuisine

Nice paper on PLOS: 'Phytoliths in Pottery Reveal the Use of Spice in European Prehistoric Cuisine'. The title pretty much says it all. The critical image is above, the subtext below, but first the English & Latin names for the herbs found. I do wonder though if the consistent presence of the opium poppy might indicate prehistoric addition rather than spicing. Coriander was found in Tutankhamun's tomb.

Opium poppy (Papaver somniferum)
Dill (Anethum graveolens)
Caper (Capparis spinosa)
Coriander (Coriandrum sativum)
Cumin (Cuminum cyminum)
A kind of mustard ? (Cruciferae family)
"Figure 1. Early contexts from which spices have been recovered, with photomicrographs of globular sinuate phytoliths recovered from the pottery styles illustrated.
Showing, A) A map of Europe showing an inset of the study area and sites from which the pot residues were acquired;, including also the Near East and northern Africa indicating early contexts where spices have been recovered: a) Menneville, France (Papaver somniferum L.), b) Eberdingen, Germany (Papaver somniferum L.), c) Seeberg, Switzerland (Papaver somniferum L.), d) Niederwil, Switzerland (Papaver somniferum L.), e) Swiss Lake Villages, Switzerland (Anethum graveolens L.), f) Cueva de los Murcielags, Spain (Papaver somniferum L.), g) Hacilar, Turkey (Capparis spinosa L.), h) Tell Abu Hureya, Syria (Caparis spinosa L.), i) Tell ed-Der, Syria (Coriandrum sativum L. and Cuminum cyminum L.), j) Khafaji, Iraq (Cruciferae family), k) Tell Aswad, Syria (Capparis spinosa L.), l) Nahal Hemar Cave, Israel (Coriandrum sativum L.), m) Tutankhamun's tomb, Egypt (Coriandrum sativum L.), n) Tomb of Kha, Egypt (Cuminum cyminum L.), o) Tomb of Amenophis II, Egypt (Anethum graveolens L.), p) Hala Sultan Tekke, Cyprus (Capparis spinosa L.), q) Heilbronn, Germany (Papaver somniferum L.), r) Zeslawice, Poland (Papaver somniferum L.) [compiled using 8–17]. B) Hunter-gatherer pointed-based vessel (on the left) and Early Neolithic flat-based vessel (on the right). C) Scanning Electron Microscope image of a globular sinuate phytolith embedded in a food residue, D) optical light microscope image of modern Alliaria petiolata globular sinuate phytoliths, and E) optical light microscope image of archaeological globular sinuate phytolith examples.

woensdag 18 juni 2014

Strabo's Plantlist

Walafrid Strabo (808-849) was, among many other things, the author of the gardening poem Hortulus, an account of the herbs he grew in his garden and their medical uses. As such it gives us the first plant list for a monastic herb garden, (extracted from):
Clary sage
Indian pepper

dinsdag 10 juni 2014

Images from the Phycologia Australica [A history of Australian Seaweeds]

"Phycologia australica; or, A history of Australian sea weeds ... and a synopsis of all known Australian Algae" (1858-63) by William Henry Harvey.

Distant Neighbors, the letters of Wendell Berry and Gary Snyder.

Of all books that I have read last decade Gary Snyder's 'Practice of the Wild' has made the most impact on me. The selected letters of Allen Ginsberg and Snyder came out in 2009 (edited by beat pinata Bill Morgan) and it failed to impress on every level: the letters were short, contained barely any new info, did not make up for it with slylish panache. If you did not know who Ginsberg and Snyder were the letters would have never given you the idea that they were friends, more poet-celebs maintaining a beneficial node in their social network. That book was just another piece of worthless beat nostalgia to rip off the fans. When I saw Distant Neighbors advertised, the selected letters of Snyder and Wendell Berry (edited by Chad Wriglesworth), however I knew that I would get something much better. 

Both Wendell Berry (that eloquent secular-Amish farmer-intellectual whose stodgy perspectives on (agri)culture and nature always seem realistic, conservative and radical at the same time) and Gary Snyder (that zen-mountaineer-poet with a surprisingly small oeuvre) are never going to be Horace Walpole's but then Walpole was not homesteader.
If you think about picking up this book to learn more about the beats then you do not need to bother.

My main problem with Snyder is that never seems to put himself in a position of being under serious scrutiny. His published interviews all have the interviewer assuming the position of humble acolyte listening in awe while the Master sits and teaches with timeless abandon. In that Snyder has with grace reinvented the Confucian (no: Kungian) form for the age of Aquarius. I don't mind it but for an intellectual he has engaged himself in surprisingly little discussion and polemics. His position on overpopulation for instance he has made for at least 40 years but no one has ever made him elaborate on how the population decline he so much desires could be enforced without draconian measures. He takes the position, declares it central, but fails to substantiate it and nobody ever seems to have challenge him about it. But in Distant Neighbors we find Berry critiquing him for it and asking him to clarify his position. I was anticipating a polite but fierce discussion but what does Snyder do? In a next letter he merely shrugs. It confirms the hunch I have about Snyder: he takes critique very badly.

The book begins with a letter from 1973 and ends with a letter from 2013. From a distance we see the man float through life: working the land, traveling to and from public ado's, discussing the seasons and the weather, suggesting books and sharing poems and essays, sometimes they tease. For instance when Snyder in response to Berry's essay on why he will never use a computer sends him a love poem about text processing.

In the background the extended families act as background radiation: children and grandchildren, disease and death. Who would have though that Snyder would so gently break the news to Berry about him swapping wifes with real concern for Berry's more conservative antics on such matters.  Berry takes it well and seems to have taken more to the new partner than he ever did to the old. But that is conjuncture, these are man from  I you think about picking up this book to learn more about beat-matters than don't. Mars, silent on emotions.

So what do we have here: 40 years of correspondence, that show two distant friends keeping in touch. Sometimes they argue, sometimes they ask for advice, often they are planning how and when they are going to meet. I would not call this great letter writing but you see something of the pace of life of both authors and you get a sense of what life was like for them as they were writing their books. I learned something new about how The Practice of the Wild was written. That alone is enough for me.

vrijdag 6 juni 2014

Tebu's message [Batek story]

Below is a story from 'Changing Pathways: Forest Degradation and the Batek of Pahang, Malaysia' (2004) by Tuck-Po Lye. It is Tebu's message to the world to stop destroying his home forest.  The book gives it in the original language, a literal transcript and a free translation. This is the transcription but with some additional markings omitted.

World-finish - world-finish. Already-no-tree.

When-they-dynamite, Gubar-long time-rain. we remember.

Do-only untill-that. We-find-food-same. Can-not-fond of-appropriately-that-we-find-food.

River Temoh-no-tree. Oil palm-only.

Soul-to live-upon-tree.

Island hold-up-earth.

That is past-we Peace-no-lose-world.

Person-superhuman-to-say: hearth-earth to make.

They remember they miss.

To feel sorry for-song.

They love.

We listen - - what - - we hold voice.

Tree-finish, no-place-we to be shaded.

Can-we-meeting, meeting-can-we decide together-do-then. We refuse to give up-world. Don't-
we-lose out on-world. We-know-we-eat, we-know-we-keep.

Malays-they-think-of road-they-put down-oil palm. Consider-they-kill-world. Where-we-live. So-they-
kill-world-ours. Before-we-sit-healthy. Now-no-we want-healthy-already. So law-us same.

We-miss-time-peace. Remember, we miss. We-show how.

Already-broken-earth. Soul river-block. Important-danger. River-not-it wants-flow. It-spills. Land-soft. Land collapse. It make-channel-it-break-there.

Like-like, loof for-good - - for-food-we-rich, but-world-none. Know-we-keep. Not-we-rich-we kill-world. Short-we to-become-long. We-know-we-keep. We-look-for-food, we-value-soul-world. 

But-not-they-know-value-soul-world, don't know-then.

Value-soul-world. We-remember-before. As long as living-we-in-forest, we-give-instructions. Don't-we-fight, kill each other.

Not-easy - - suffering. End of-life-they-do.

Kill-world. Ridicule-we-live-wild. No-they-know-they-think. I want-them-know-way-reason.

dinsdag 3 juni 2014

The origin and evolution of herbals (Agnes Arber)

It is hard to escape the image of the modern day wild plant watcher as a bearded teacher of the old stamp who would wear a dear stalker on his floral huntings if only his wife would let him. It has not always been like that as Agnes Arber's 'Herbals, their origin and evolution' (1912/1938, reprinted 1986) shows. Arber takes us through the history of herbals between 1470 and 1670, roughly the years spanning the discovery of printing and the emergence of botany as a science in its modern form. There is a great deal to be learned, but what strikes me most is that many of the botanical advances reported share a close proximity to the intellectual spheres as so eloquently described by Frances Yates: the world of Elizabethan Rosicrucians and radical (hermetic) philosophy. Many herbalists were radical protestants, often on the move to avoid prosecution, operating in the intellectual and power hubs of the Renaissance world. We witness the change from medical herbalism to botany, we see how novelties emerge and how stubbornly certain traditions are maintained. We get a glimpse of how the plants of the new world were integrated, and how hard it was to see them for what they were. The earliest herbals in print were often reissues of manuscripts, creating a timeline of at least a millennium for certain texts. 

What makes this book even more wonderful is the liberal use of images. Nothing can beat a good woodcut.

Through sympathetic magic Arber's book also gave me new respect for the Heukels', the most complete lay flora for the Netherlands. Not only does it contain information to the point of singularity it has now also acquired for me the patina of history. If you look of the drawings you can see how little has changed.


maandag 26 mei 2014

Old world plants in the new world as seen by John Josselyn

John Josselyn is known in environmental history as the first author to record changes in the floral landscape of the new world as a consequence of European settlement. Read: the first to write and identify common agricultural weeds. His 1671 book 'New England's Rarities, discovered in Birds, Beasts, Fishes, Serpents, and Plants of that Country' is small but trailblazing. Josselyn was not a botanist and his findings are not deemed 100% trustworthy, but his reliability goes up when giving the list of plants 'that sprung up since the English planted and kept cattle in New-England'. The list is small and the footnotes by Edward Tuckerman in the 1865 reprint available on Archive almost crowd them out. Here they are:

dinsdag 20 mei 2014

Rene Redzepi and Alfred W. Crosby

Yarrow (Gerarde 1597)

To most people the common yarrow will be a weedy roadside plant best kept out of the garden. It is easy to overlook that this humble plant was a witness to all of the 'Rise of the West' (McNeill). Its botanical name refers to Achilles who purportedly took it along as an antibiotic on his travels, the Norse introduced it to Greenland about 1000AD and it is now common in large parts of the world.

Yarrow also features as a foraged green in Rene Redzepi's NOMA kitchen where it is a common ingredient. It is also included several times in Redzepi's tome: 'Noma: Time and Place in Nordic Cuisine' (2010). Out of thin air, despite its generalist cosmopolitanism, Yarrow (or bloodwort or milfoil) was made to stand as a symbol of environmental awareness, hyper-regionality and creative idealism, a pawn in the battle for global food security and Michelin Stars. Yes the yarrow is local but it is local to, back of the envelope calculation, everybody living in the temperate zone. This is a pattern, not just a particular aspect of yarrow which is actually a very bad example as the new world already possessed yarrow, a variation with a genetic link so close that it continues to baffle taxonomists. 

The foraging locavore (from Euell Gibbons to Richard Mabey) is almost always subsisting on plants that have long ago left their natural boundaries and gone global. Yarrow, nettle, dandelion, cowslip, garlic mustard, chickweed and sorrel, all used at NOMA, are all extremely hardy and thrive on human disturbance. These are plants that were introduced to the Americas and Australia as a consequence of European farming practices, as so well described by Alfred W. Crosby in The Columbian Exchange (1972) and Ecological Imperialism (1986).

The ironies are several. Regionality is celebrated by making use of plants that have gone global (making it possible for a cook in New Zealand to reproduce a Nordic recipe). The chef who made his stake claiming that at least one third of his ingredients was foraged is relying heavily on plants associated with farming to do so. The plants that are used to make his food 'distinct' are some of the commonest plants on earth. The dandelion, after all, is the plant on which the sun never sets (Crosby).

Redzepi is famous for not using olive oil as the token symbol of him turning his back on the high tradition of French cuisine. When running the entire ingredient list of the NOMA book through Map Your Recipe you would expect a large part of the plant-ingredients to be domesticated in the Euro-Siberia center. A relatively small center missing from the original scheme proposed by Vavilov but added by his students. It is the origin of such plants as kale and kohlrabi. It has those but the book includes ingredients originally domesticated in every global center of diversity bar Tropical Africa and Australia, just like the Big Mac:

Earlier I already reported that food pairing visualizations may suggest that Redzepi still thinks like a classical (read French) chef. The abundance of plants domesticated in the Mediterranean also confirms this.
I am not a geo-food fundamentalist; there is no cuisine in the world that does not make use of globalized plant resources (perhaps only apart from the one you find in the Eskimo Cookbook). Cooking is culture not nature and the concept of an evasive plant makes no culinary sense. This is not meant to detract from Redzepi's project, which I continue to find admirable, but it is meant to remind us of the fact that in a globalized, anthropogenic landscape every claim made about regionality needs to be understood and evaluated against a backdrop of global environmental transformation.

World history weighs in on every locality on the planet, plants tells that story.