Blog Archives

cMDS: visualising changing distances

November 11, 2013
By
cMDS: visualising changing distances

Gina Gruenhage has just arxived a new paper describing an algorithm we call cMDS. Here’s what it’s for: if you do any kind of data analysis you often find yourself comparing datapoints using some kind of distance metric. All’s well if you have a unique reasonable distance metric you can use, but often what you

Read more »

ECVP tutorial on classification images

August 30, 2013
By
ECVP tutorial on classification images

The slides for my ECVP tutorial on classification images are available here. Try this alternative version if the equations look funny. (image from Mineault et al. 2009) The slides are in HTML and contain some interactive elements. They’re the result of experimenting with R Markdown, D3 and pandoc. You write the slides in R Markdown,

Read more »

Fitting psychometric functions using STAN

August 19, 2013
By
Fitting psychometric functions using STAN

STAN is a new system for Bayesian inference, similar to BUGS and JAGS. I’ve played with it a bit and it’s quite promising, it really has the potential to make MCMC less of a pain (on simple models). I’ve written a short introduction to fitting psychometric functions using STAN and R, in case that’s useful

Read more »

Predicting spatial locations using point processes

June 25, 2013
By
Predicting spatial locations using point processes

I’ve uploaded a draft tutorial on some aspects of prediction using point processes. I wrote it using R-Markdown, so there’s bits of R code for readers to play with. It’s hosted on Rpubs, which turns out to be a great deal more convenient than WordPress for that sort of thing.

Read more »

Finding patterns in time series using regular expressions

May 17, 2013
By
Finding patterns in time series using regular expressions

Regular expressions are a fantastic tool when you’re looking for patterns in time series. I wish I’d realised that sooner. Here’s a timely example: traditionally, when you have two successive quarters of negative GDP growth, you’re in recession. We have a quarterly GDP time series for Australia, and we want to know how many recessions

Read more »

Barycentric interpolation: fast interpolation on arbitrary grids

March 6, 2013
By
Barycentric interpolation: fast interpolation on arbitrary grids

Barycentric interpolation generalises linear interpolation to arbitrary dimensions. It is very fast although suboptimal if the function is smooth. You might now it as algorithm 21.7.1 in Numerical Recipes (Two-dimensional Interpolation on an Irregular Grid). Using package geometry it can be implemented in a few lines of code in R. Here’s a quick explanation of what

Read more »

Slightly silly D3 example: shift one datapoint to get a significant result

February 7, 2013
By
Slightly silly D3 example: shift one datapoint to get a significant result

Have you ever seen these scatterplots that report a significant correlation between X and Y, and look like it’s just the one point to the upper-right driving the correlation? Thanks to this interactive tool, you too can do this at home.

Read more »

Interactive MDS visualisation using D3

January 8, 2013
By
Interactive MDS visualisation using D3

Here’s a sneak peak into upcoming visualisation work. I’ve been working a bit on MDS (Multi-dimensional scaling), a classical technique for visualising distance data. Classical MDS is useful, but interactive MDS is *much* more useful. Using D3, a Javascript visualisation framework, it’s relatively easy to make interactive MDS plots. This example shows how basic interaction

Read more »

French R Conference in Lyon – call for contributions

December 12, 2012
By
French R Conference in Lyon – call for contributions

La prochaine édition des Rencontres R aura lieu à Lyon en Juillet prochain. Ci-dessous, l’appel officiel à contributions. ————————————————– Appel à communication des 2èmes Rencontres R : Dans la lignée de la conférence internationale Use’R et suite à la première édition qui a eu lieu à Bordeaux

Read more »

edply: combining plyr and expand.grid

November 30, 2012
By
edply: combining plyr and expand.grid

Here’s a code snippet I thought I’d share. Very often I find myself checking the output of a function f(a,b) for a lot of different values of a and b, which I then need to plot somehow. An example: here’s a function that computes the value of a sinusoidal function on a grid of points,

Read more »