Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions +rsa/+spm/crossvalIPMraw.m
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
if (length(conditionVec)<numReg)
conditionVec=[conditionVec;zeros(numReg-length(conditionVec),1)];
end;
Z = indicatorMatrix('identity_p',conditionVec);
Z = rsa.util.indicatorMatrix('identity_p',conditionVec);
nonInterest = all(Z==0,2); % Regressors not in the conditions
numNonInterest = sum(nonInterest);
Z(nonInterest,end+1:end+sum(numNonInterest))=eye(numNonInterest);
Expand Down Expand Up @@ -107,7 +107,7 @@
KWY(idxT,:)=KWY(idxT,:)*sq;
end;
case 'overall'
Sw_hat=covdiag(res,SPM.xX.erdf); % regularize Sw_hat through optimal shrinkage
Sw_hat=rsa.stat.covdiag(res,SPM.xX.erdf); % regularize Sw_hat through optimal shrinkage
[V,L]=eig(Sw_hat); % This is overall faster and numerical more stable than Sw_hat.^-1/2
l=diag(L);
sq = V*bsxfun(@rdivide,V',sqrt(l)); % Slightly faster than sq = V*diag(1./sqrt(l))*V';
Expand Down Expand Up @@ -152,4 +152,4 @@
end;
IPM = mean(IPM,3);
IPM = 0.5*(IPM+IPM');
end
end