Christoph Budziszewski commited on 2009-04-26 18:27:56
Zeige 4 geänderte Dateien mit 15 Einfügungen und 5 Löschungen.
git-svn-id: https://svn.discofish.de/MATLAB/spmtoolbox/SVMCrossVal@185 83ab2cfd-5345-466c-8aeb-2b2739fb922d
| ... | ... |
@@ -60,7 +60,7 @@ for s = 1:nSubjects |
| 60 | 60 |
indexToCoordMap = java.util.HashMap; |
| 61 | 61 |
coordToIndexMap = java.util.HashMap; |
| 62 | 62 |
for iVoxel = 1:nVoxel |
| 63 |
- coord = [x(iVoxel) y(iVoxel) z(iVoxel)]; |
|
| 63 |
+ coord = [x(iVoxel) y(iVoxel) z(iVoxel)] |
|
| 64 | 64 |
a = java.util.Vector(3,0); |
| 65 | 65 |
a.add(0,coord(1)); |
| 66 | 66 |
a.add(1,coord(2)); |
| ... | ... |
@@ -131,9 +131,10 @@ for s = 1:nSubjects |
| 131 | 131 |
nSamplePoints = ((timeLineEnd-timeLineStart)/res) +1; |
| 132 | 132 |
|
| 133 | 133 |
if isempty( fbsargs.timeline ) |
| 134 |
- fbsTimeLine = 1:nSamplePoints |
|
| 134 |
+ fbsTimeLine = 1:nSamplePoints; |
|
| 135 |
+ fbsTimeLine = fbsTimeLine +globalStart; |
|
| 135 | 136 |
else |
| 136 |
- fbsTimeLine = fbsargs.timeline |
|
| 137 |
+ fbsTimeLine = fbsargs.timeline; |
|
| 137 | 138 |
end |
| 138 | 139 |
|
| 139 | 140 |
|
| ... | ... |
@@ -152,6 +153,7 @@ end |
| 152 | 153 |
end |
| 153 | 154 |
% get surrounding coordinate-IDs within radius |
| 154 | 155 |
sphere = fbs_buildSphere(mapping,iVoxel,radius,vdim); |
| 156 |
+% pause |
|
| 155 | 157 |
|
| 156 | 158 |
%build svm inputmatrix |
| 157 | 159 |
svmdata = []; |
| ... | ... |
@@ -169,6 +171,7 @@ end |
| 169 | 171 |
end |
| 170 | 172 |
|
| 171 | 173 |
if RANDOMIZE_DATAPOINTS |
| 174 |
+% [svmlabel svmdata] |
|
| 172 | 175 |
rndindex = randperm(length(svmlabel)); |
| 173 | 176 |
svmdata = svmdata(rndindex,:); |
| 174 | 177 |
svmlabel = svmlabel(rndindex); |
| ... | ... |
@@ -177,7 +180,7 @@ end |
| 177 | 180 |
decode = svm_single_crossval(svmlabel,svmdata,svmopts); |
| 178 | 181 |
% save the decode value to the corresponding coordinate |
| 179 | 182 |
|
| 180 |
- coord= mapping.indexToCoordMap.get(iVoxel); |
|
| 183 |
+ coord = mapping.indexToCoordMap.get(iVoxel) |
|
| 181 | 184 |
x = coord(1); |
| 182 | 185 |
y = coord(2); |
| 183 | 186 |
z = coord(3); |
| ... | ... |
@@ -32,7 +32,7 @@ for s = 1:nSubjects |
| 32 | 32 |
|
| 33 | 33 |
disp('computing volume values, please wait');
|
| 34 | 34 |
|
| 35 |
- extr = calculateRoiImageData(subjectStruct{s}.volumes,subjectStruct{s}.roiFile);
|
|
| 35 |
+ [extr x y z] = calculateRoiImageData(subjectStruct{s}.volumes,subjectStruct{s}.roiFile);
|
|
| 36 | 36 |
|
| 37 | 37 |
nVoxel = size(extr(1).dat,1); |
| 38 | 38 |
|
| ... | ... |
@@ -41,6 +41,7 @@ for s = 1:nSubjects |
| 41 | 41 |
|
| 42 | 42 |
disp('computing psth');
|
| 43 | 43 |
for iVoxel = 1:nVoxel |
| 44 |
+ [ x(iVoxel) y(iVoxel) z(iVoxel)] |
|
| 44 | 45 |
rawdata = []; |
| 45 | 46 |
for iImage = 1:length(extr); |
| 46 | 47 |
tmp = extr(iImage); |
| 47 | 48 |