regularized nonlinear digression

neuroscience, machine learning, and the life of a lowly grad student

(the evil that is) Matlab

Oof. I just got back from a somewhat bizarre conference on the Big Island of Hawaii. It's hard to beat the location! but the conference itself was a bit of a mess. My boss and I tried to run a hands-on-tutorial using Matlab. Since Matlab is proprietary and doesn't give out nice easy-to-use trial versions, this involved waaay to much work on my part getting everything running.

Matlab really sorta sucks in the licensing department. I'm slowly trying to switch over to using Python, R, and Octave. But Matlab is just so easy for me to use! Instead of learning a bit of R I decided to write a Matlab version of this pretty sweet idea for using the Google Charts API. You just give R (or Matlab in my case) a list of numbers and countries and it spits out a map. Since Matlab (as far as I know) doesn't do mapping, it seems pretty cool.








In any case, here's an example using the same sample data (from ManyEyes) - the percentage of people who say pop vs soda in each state. And also (in lieu of my recent world travel) the annual tourism to various countries.







Here's code and code with test data.

UPDATE: Here's a quirky application of simple mapping - The Seven Deadly Sins.

Amicable Academics Abhor Anonimity

Just wanted to point out some pretty cool/disturbing research on deanonymizing data. There's a new study that takes friend-lists/followings from Flickr and Twitter and shows that even after anonymizing the Twitter data you can figure out the identity of ~1/3 of people just based on their friends in the two services (via Bruce Schneier). So umm... if you think all that tweeting about sandwiches and poop is anonymous... think again!

Also, if anyone there's anyone out there not-sick of immigration visualizations the New York Times has a pretty cool one showing how immigrants settled in the US over time (via Flowing Data).

Liferoll 090302

Whew. It's been a long past few days. I'm in Salt Lake City at a ski resort conference. 14+ hrs of science a day. It's a little exhausting. It's nice to meet the faces behind the names, and there were some interesting talks, but I'm definitely going to be sore tomorrow from skiing.

Superuseless Superpowers... brilliant
Is there anybody out there?... nice post from Uncertain Principles

...it's not nearly as much fun to talk about as the other terms in the "Drake Equation." If you use the lack of detectable alien civilizations to talk about the probability of life evolving or the probability of technological civilization surviving, you're a Deep Thinker; if you start talking about detectable signal strengths and propagation delays, you're a great big nerd.




Warai Otoko and What Not


There's a really cool project over at awgh that I played around with this morning (found via hackaday). It takes a video stream and uses processing.org (the same language I used to make that immigration animation) and an interesting looking open source computer vision library, OpenCV, to detect and then hide your face. I'm a big GiTS fan - for those who haven't seen it there's a freakishly complete wiki article on the inspiration behind this one.

That's my boss's backside in the background, btw. For some reason it was intermittently marking it as a face... which was a little awkward when he noticed.

Tips...

  • For WinXP you have to add OpenCV to the path manually (System Properties > Advanced > Environment Variables). Adding C:\Program Files\OpenCV\bin.

  • had to copy the face detection XML to the processing project folder

  • recommend adding opencv.flip( OpenCV.FLIP_HORIZONTAL ); for mirroring

Liferoll 090107

Self Awareness: The Last Frontier by VS Ramachandran - great article on consciousness and the self

...MPD [multiple personality disorder] is often a dubious diagnosis made for medico-legal and insurance purposes and tends to fluctuate from moment to moment. (I have often been tempted to send two bills to an MPD patient to see if he pays both.)



How the city hurts your brain cool article from the boston globe

...caramel lattes, iPods, discounted cashmere sweaters, and high-heeled shoes. Resisting these temptations requires us to flex the prefrontal cortex, a nub of brain just behind the eyes. [erm, right]



Greening the Ghetto article from the New Yorker feat Van Jones

Voodoo Correlations in Social Neuroscience on Neurocritic ... nice coverage of a scandalous paper in press from Hal Pashler's group that shows how about half of social neuroscience papers are bogus. I'm also presenting this paper in journal club tomorrow :).

starting Neil Gaiman's American Gods

Decoding with fMRI hype and gripe

ResearchBlogging.orgThere's been a bit of buzz about a paper that just came out in Neuron. The authors use fMRI signals from visual cortex to decode 10x10 images that subjects view while in the scanner. Since this (neural coding) is more or less what I do, I figured I'd toss in my two cents.

The idea of mad scientists "reading your mind" is probably a little scary to some people, but there's actually a lot of good that could come of it. For now, I wouldn't worry too much about people reading your thoughts - there are big limitations to taking this further.

Pharyngula points out three potential limitations, but I don't think they really get at the heart of the issue. The main limitation is resolution. fMRI can only record 2mm voxels (a 3D pixel) of activity, and the response in each of these voxels is recorded every 2 seconds or so. This is nowhere near fine enough or fast enough to do serious decoding. The fact that the part of the brain the authors record from (primary visual cortex) is laid out like the visual scene (retinotopy) shouldn't matter for decoding, but in this case, because the resolution is so low, it helps (averaging neighboring voxels can improve the signal).

The amount of computational power the authors use to decode the images isn't really a limitation at all. The math is pretty simple; I doubt if it would impress many statisticians or computational neuroscientists. More importantly the math is clean, and they cross-validate their data. They fit the model parameters on one set of data then evaluate how well it does on a different set of data. In models with many parameters it's pretty easy to get good fits. In an extreme case a model could have more parameters than data points! But because the authors evaluate the model on test data, the decoding accuracy does mean what you think it means.

The paper is a great proof of concept, though. fMRI studies have been looking at correlations between the external world and behavior for decades, but this is the first one I've seen that explicitly tests how good these signals are for reconstructing stimuli. Using the word "neuron" as an example seems a little cheesy, though. I wonder how good the decoding was for the "science" and "nature" stimuli :).

Y MIYAWAKI, H UCHIDA, O YAMASHITA, M SATO, Y MORITO, H TANABE, N SADATO, Y KAMITANI (2008). Visual Image Reconstruction from Human Brain Activity using a Combination of Multiscale Local Image Decoders Neuron, 60 (5), 915-929 DOI: 10.1016/j.neuron.2008.11.004

Liferoll 081223

Google Flu Trends - flu predictions from search volume
Seed: The Advisors - expertise in the white house... finally
Neural Coding in the news: 10x10 images from fMRI
almost finished with The Origins of Wealth
starting Musil's The Man without Qualities