-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
noise_prec_from_unbalanced produces NaN values #389
Comments
Hi Nina, |
Hi Jasper, thanks for writing back to me! In the attachment you can find one dataset object for one particular ROI (lateral occipital complex - 423 voxels). Indeed, I have all my runs in one single GLM - I use SPM. Below I include a example of my design matrix Let me know if you have more questions. Nina |
Dear Jasper, I am here at CNS listening to a talk of Niko Kriegeskorte about the rsatoolbox and this reminded me of my post. Did you have time to look at the issue I am having? Thanks! |
Hi Nina, unfortunately I haven't yet, but thanks for reminding! |
Hello,
I recently started using rsatoolbox in python in order to compute Mahalanobis distances (and eventually crossnobis + taking noise variance into account). I have an unbalanced design - the number of voxels/channels differs between conditions and I am not sure how the toolbox is dealing with these NaN values when computing the precision matrix.
I have 8 different conditions (or items) and 4 runs, resulting in 32 patterns (Each condition was repeated once in every run). The number of channels differ between conditions (or even within conditions across runs) - when a value is missing this is replaced by a NaN value
I wanted to start simple and follow the demo to compute the precision matrix:
noise_prec_diag = rsatoolbox.data.noise.prec_from_measurements(data, obs_desc='items', method='diag')
as this gave me a noise precision matrix with NAN values I tried:
Again I get all NaN values in the noise precision matrix and I noticed when looking at data.measurements that running this function sets all the rows of any channel that had missing values to NaN (so now the channel has NaN values for all conditions and runs, while initially it only had NaN for certain rows).
I tried to figure it out by looking at the code of the toolbox but it is really hard to follow the order of computations.
I have two questions:
Irrespective of the issue with the NAN values I was also doubting whether 8 conditions x 4 runs is enough to estimate precision. I have residuals (1 per voxel) from the GLM that potentially could be used instead but I was not sure it is ok to just have 1 residual per voxel (even though I have 32 multivoxel patterns = 8 conditions x 4 runs).
Thank you in advance for any help!
Nina
The text was updated successfully, but these errors were encountered: