Friday, November 21, 2014

Heraldic Homecoming

In the first 22 years of my life, I never met anyone with the surname "Wills" that I wasn't related to. In fact, there seemed to be considerable resistance to the idea that "Wills" was in fact a surname, with people regularly converting it to "Willis" or "Will".  Having recently discovered there are TWO Andy Wills on the lecturing staff of Plymouth University, I looked a bit further into the university records. There are 40 current students and 11 current staff called Wills. Oh, and there's a Wills presenting local TV news, too, and two at my daughter's shcool. I have the strange feeling that I may have accidentally come home, heraldically speaking :-)

Friday, November 14, 2014

First Neural Network simulation with RCpp (R / C++ integration)

My first look into using RCpp within R to speed up neural network simulations worked out reasonably well.

Starting with as-vectorized-as-possible R code (so, presumably, fairly optimal), my test simulation (100 runs of simulating 1,500 trials of the ALCOVE model, Kruschke, 1992; multiple runs are needed as trial order affects outcome) took about 22 seconds on my 2013 Macbook Pro. Converting the time-sensitive ALCOVE parts of the R code into C++ brought the run time down to less than 3 seconds,  for an approximately 8x speed up.

These are small gains in absolute terms, but become more significant when attempting multi-parameter optimization. This often requires hundreds of iterations. In initial tests, an optimization took about 8 minutes; in plain R the same optimization would have taken over an hour.

I think I should be able to get a further 8x speed up using snowfall and a faster workstation, bringing an optimization run down to around one minute. That's for another day, though.

Thursday, November 13, 2014

Adventures in RCpp

I spent yesterday looking into using C++ within R as an environment for neural network simulations (NNs are the classic case where iteration n+1 depends on the output of iteration n, so they do not vectorize easily and hence tend to be rather slow in plain R). R's RCpp package is intended to make R and C++ integration easy. Looking promising so far, but this cartoon Charlotte Edmunds showed me is particularly apt :-) http://xkcd.com/1445/


Thursday, October 2, 2014

Plymouth University in UK Top 20 for Research Quality

I guess we all like league tables when they make us look good :-). Here's a table that uses the Times Higher Citation scores to rank universities. Plymouth makes it into the UK Top 20 for the second year running, and is ahead of a number of notable institutions (including Exeter, Warwick, and Cardiff).


Rank University
1 Royal Holloway
2 Oxford
3 Cambridge
4 Sussex
5 York
6 Imperial College
7 Durham
7 Queen Mary
9 Edinburgh
9 King's College
11 St George's London
12 Bristol
12 UCL
14 Dundee
15 East Anglia
15 Glasgow
17 St Andrews
18 Plymouth
19 Southampton
20 Exeter
20 Lancaster
21 Liverpool
22 Brunel
23 Aberdeen
24 Manchester
24 Sheffield
27 LSE
28 Newcastle
29 Cardiff
29 Leeds
31 Warwick
32 Leicester
33 Hertfordshire
34 Birmingham
34 Nottingham
36 Portsmouth
37 Birbeck
38 Reading
39 Bangor
40 Aberystwyth
40 Queens Belfast
42 Stirling
43 Bath
44 Aston
45 Essex
na Heriot Watt
na Keele
na Loughborough
na L'pool John Moores
na Surrey


Friday, September 12, 2014

Twenty years of research

Twenty years ago this month I moved to Cambridge to start my Ph.D. with Ian McLaren.

Thursday, September 11, 2014

Automatic graphic file conversion (OS X)

There's a great command-line tool  for graphic file conversion called sips. For example, to convert all BMP files in the current directory to PNG files placed in a subdirectory you have made called 'pngs', just type:

sips -s format png ./*.bmp --out pngs

Of course, for 1-2 files, using Preview is probably just as quick, but for 10+ files, this can save a lot of time. I think imagemagick can do something similar on Linux, not sure about Windows.

UPDATE: In Linux, use e.g.

mogrify -format png *.jpg
 

Thursday, September 4, 2014

Bye Bye Virgin Media

My Virgin Media home broadband was looking a little out-of-date (3.6Mb/s download; 1MBs/s upload), and a 30 minute phone call with them ended with them saying this was the best service they could offer at my address. Kinda ridiculous as I'm in the centre of a city (Plymouth, UK). So, bye bye Virgin, hello BT. The new service kicked in this morning -- 63.6Mb/s download; 18.2MB/s upload ! Not only 18x faster that Virgin, but also 2-6x faster than my WiFi connection at Plymouth University!