-
Adaptive Metropolis-Hastings – a plug-and-play MCMC sampler
Gibbs sampling is great but convergence is slow when parameters are correlated. If the covariance structure is known, you can reparametrize to get better mixing. Alternatively you can keep the same parametrization but switch to Metropolis-Hastings with a Gaussian proposal distribution whose covariance is similar to the model parameters. But what if you don’t know
-
Multidimensional products in Matlab
Matlab is great for working with vectors and matrices, but higher-order tensors are poorly supported. Even something as simple as multiplying a 3d matrix with a vector — in Einstein notation, — is a pain. I’ve tried different toolboxes before, as well as my own workarounds based on reshape and permute, but I was never
-
Decoding fMRI activity evoked by natural movies
The Gallant lab have just published a new paper in Current Biology about decoding visual activity in fMRI evoked through natural movies. TryNerdy has a very high level overview of the paper. Here I’m more interested in the nitty gritty computational/statistical details. The idea is to train an encoding model using fMRI responses during natural
-
Waiting times in cyclical HMMs: modeling neuronal refractoriness
Cyclical Hidden Markov models (HMMs) can be used to sort spikes. For example, in Herbst et al. (2008), wideband data is assumed to be generated by an HMM, where for most of the time the HMM is in the rest state, and with small probability jumps to the spike initiation state. Once it’s in the
-
xkcd’s cloud viewer, binocular vision and telestereoscopes
A recent xkcd comic illustrated a really neat idea: enhancing binocular vision artificially to view distant objects in “true” 3d. Binocular disparity, the mismatch between the position of objects between the two eyes, is a particularly strong 3d cue. It’s really only well useful for objects which are physically close to the observer. You can
-
Using the SVD to estimate receptive fields
Spatio-temporal receptive fields can be hard to visualize. They can also be quite noisy. Thus, it’s desirable to find a low-dimensional approximation to the RF that is both easier to visualize and less noisy. The SVD is frequently used in neurophysiology for this purpose. Reading the Wikipedia page on the SVD, you might have trouble