Dear PRoNTo developers/users,
This might be my mistake or a bug: when selecting to build weight images for permutations I get some warnings/errors:
1. the first weight image (first permutation) appears to complete successfully, but the resulting image file has a .img but no .hdr (Matlab also produced a warning message saying that it cannot find the .hdr file).
2. when it gets to the second permutation, it crashes at line 52 of "prt_weights_bin_linkernel" when cycling through ncoeffs:
% compute weigths
for i=1:ncoeffs
tmp1 = single(d.datamat(i,:));
tmp2 = single(d.coeffs(i));
img1d = img1d + tmp1 * tmp2;
end
The reason for the crash is that ncoeffs is 34 (the number of subjects in the analysis) but d.datamat has a first dimension of 33. This reduced value originates from the earlier calling function "prt_compute_weights_class" on line 236 where the d.datamat is reduced by one subject according to the variable "train_idx" as part of the leave-one-out CV procedure.
It's not clear to me why the code attempts to cycle through every fold (ncoeffs) here, but apply the coefficients to data after leaving a subject out?
Many thanks in advance
Chris
|