This repo contains code to optimally decode stimulus features from a previously fit encoding model.
The first use-case is for the reconstruction of visual images from brain activations after population receptive field mapping of these voxels.
numpy, scipy, lmfit, popeye, pytables, hrf_estimation
- fit pRF profiles
- Generate residual timecourses for fitted data: a. leave-one-out, predict timecourses of loo separate runs (concatenated) based on pRF profiles
- We use the covariance models originally developed in: van Bergen, R. S., Ma, W. J., Pratte, M. S., & Jehee, J. F. M. (2015). Sensory uncertainty decoded from visual cortex predicts behavior. Nature Neuroscience, 18(12), 1728–1730. http://doi.org/10.1038/nn.4150, to optimally capture voxel covariance
- Standard Bayesian conditional/posterior definitions for multivariate Gaussian residuals (As in van Bergen or Nishimoto)
- "Firstpass" independent-pixels decoder to avoid combinatorial explosion and prior-bias.
- Standard LL minimization to obtain best available (time-independent) decoding.
Handle time dependency
loo fits were done on loo data: run_1 is the median over runs 2-6. For residuals we have to concatenate runs 2-6, and use the prf prediction from the prf run_1. Then, the test set is the psc/run_1 data.