The caret package for R provides a variety of error metrics for regression models and 2-class classification models, but only calculates Accuracy and Kappa for multi-class models. Therefore, I wrote the following function to allow caret:::train t...

Earlier this year I doodled a recipe for comparing the folk commonly followed by users of a couple of BBC programme hashtags (Social Media Interest Maps of Newsnight and BBCQT Twitterers). Prompted in part by a tweet from Michael Smethurst/@fantasticlife about generating an ESP map for UK politicians (something I’ve also doodled before – Sketching

What is the difference between Monte Carlo — as it is usually defined in finance — and random portfolios? The meaning of “Monte Carlo” The idea of “Monte Carlo” is very simple. It is a fancy word for “simulation”. As usual, it is all too possible to find incredibly muddied explanations of such a simple … Continue reading...

It’s Saturday midnight and I’m already sleepy. However, after several hours, I finally got this google geographic map embedded in my post. Aha!!! This is about 20 finalists from the 9th season of So You Think You Can Dance. I count the states … Continue reading →

In my last post I have shown a solution to classical sorting problem in R. So I thought that this time it would be nice to generate a strategy for playing Mastermind using R.It was shown by D.E. Knuth that Mastermind code can be bro...