Sunday, February 27, 2011

…with just a hint of Naive Bayes in the nose

This interesting bit showed up at Language Log this week. I'd like to see it applied to beer reviews as well; I believe the results would be similar.

Using descriptions of 3,000 bottles, ranging from $5 to $200 in price from an online aggregator of reviews, I first derived a weight for every word, based on the frequency with which it appeared on cheap versus expensive bottles. I then looked at the combination of words used for each bottle, and calculated the probability that the wine would fall into a given price range. The result was, essentially, a Bayesian classifier for wine. In the same way that a spam filter considers the combination of words in an e-mail to predict the legitimacy of the message, the classifier estimates the price of a bottle using its descriptors.

The analysis revealed, first off, that "cheap" and "expensive" words are used differently. Cheap words are more likely to be recycled, while words correlated with expensive wines tend to be in the tail of the distribution. That is, reviewers are more likely to create new vocabulary for top-end wines. The classifier also showed that it's possible to guess the price range of a wine based on the words in the review.

Bonus points for the Monty Python reference in the comments.

Monday, February 21, 2011

Disaster! ...almost.

Fired up Eclipse this morning, meaning to make some more progress on my Android app.

Shocked to see all my code, settings, everything...gone.

Scrambled to find my USB drive containing the backup. The twelve-days-and-two-versions-old backup.

# find / -name 'Android*' -print

Relieved to find that my ever-so-helpful cats had moved my code folder to another location.

All is now well. And I'm creating a new backup.

Friday, February 4, 2011

Beer Batter Is Better

Why beer batter makes scientifically superior fish and chips.

Beer is saturated with CO2. Unlike most solids, like salt and sugar, which dissolve better in hot liquids than they do in cold, gases dissolve more readily at low temperatures. Put beer into a batter mix, and when the batter hits the hot oil, the solubility of the CO2 plummets, and bubbles froth up, expanding the batter mix and lending it a lacy, crisp texture.

Read the whole tasty article at Scientific American.