Browse code

refactored LabelMap getter with lm prefix.

git-svn-id: https://svn.discofish.de/MATLAB/spmtoolbox/SVMCrossVal@144 83ab2cfd-5345-466c-8aeb-2b2739fb922d

Christoph Budziszewski authored on 06/03/2009 12:49:18
Showing 8 changed files
1 1
deleted file mode 100644
... ...
@@ -1,3 +0,0 @@
1
-function svmlabel = getSVMLabel(mapping,condition)
2
-    svmlabel = getValue(mapping,getLabel(mapping,condition));
3
-end
4 0
\ No newline at end of file
5 1
similarity index 72%
6 2
rename from @LabelMap/getClasses.m
7 3
rename to @LabelMap/lm_getClasses.m
... ...
@@ -1,4 +1,4 @@
1
-function classCells = getClasses(mapping)
1
+function classCells = lm_getClasses(mapping)
2 2
     hset = mapping.LabelToValue.keySet;
3 3
     hset = hset.toArray;
4 4
     for item = 1:hset.length
5 5
similarity index 82%
6 6
rename from @LabelMap/getCondition.m
7 7
rename to @LabelMap/lm_getCondition.m
... ...
@@ -1,4 +1,4 @@
1
-function conditionvector = getCondition(mapping,label)
1
+function conditionvector = lm_getCondition(mapping,label)
2 2
 if mapping.LabelToCondition.containsKey(label)
3 3
     hset = mapping.LabelToCondition.get(label);
4 4
     hset = hset.toArray;
5 5
similarity index 78%
6 6
rename from @LabelMap/getLabel.m
7 7
rename to @LabelMap/lm_getLabel.m
... ...
@@ -1,4 +1,4 @@
1
-function label = getLabel(mapping,condition)
1
+function label = lm_getLabel(mapping,condition)
2 2
 if mapping.ConditionToLabel.containsKey(condition)
3 3
     label = mapping.ConditionToLabel.get(condition);   
4 4
 else
5 5
similarity index 65%
6 6
rename from @LabelMap/getPSTEventMatrix.m
7 7
rename to @LabelMap/lm_getPSTEventMatrix.m
... ...
@@ -1,9 +1,9 @@
1
-function m = getPSTEventMatrix(mapping)
1
+function m = lm_getPSTEventMatrix(mapping)
2 2
     m = [];
3 3
     size(mapping.LabelToCondition.keySet)
4 4
     for key = 1:size(mapping.LabelToCondition.keySet)
5 5
         label = mapping.LabelToCondition.keySet.toArray;
6 6
         label = label(key);
7
-        m = [m ; getCondition(mapping,label)];
7
+        m = [m ; lm_getCondition(mapping,label)];
8 8
     end
9 9
 end
10 10
\ No newline at end of file
11 11
new file mode 100644
... ...
@@ -0,0 +1,3 @@
1
+function svmlabel = lm_getSVMLabel(mapping,condition)
2
+    svmlabel = getValue(mapping,lm_getLabel(mapping,condition));
3
+end
0 4
\ No newline at end of file
1 5
similarity index 78%
2 6
rename from @LabelMap/getValue.m
3 7
rename to @LabelMap/lm_getValue.m
... ...
@@ -1,4 +1,4 @@
1
-function value = getValue(mapping,classLabel)
1
+function value = lm_getValue(mapping,classLabel)
2 2
 if mapping.LabelToValue.containsKey(classLabel)
3 3
     value = mapping.LabelToValue.get(classLabel);   
4 4
 else
... ...
@@ -24,7 +24,7 @@ for timeShift   = timeLineStart:1:timeLineEnd
24 24
     anyvoxel = 1;
25 25
     for pstConditionGroup = 1:size(pst{1,anyvoxel},2)
26 26
         for dp = 1:size(pst{1,anyvoxel}{1,pstConditionGroup},1) % data point
27
-            row = getSVMLabel(labelMap,eventList(pstConditionGroup,1));
27
+            row = lm_getSVMLabel(labelMap,eventList(pstConditionGroup,1));
28 28
             for voxel = 1:size(pst,2)
29 29
                 row = [row, pst{1,voxel}{1,pstConditionGroup}(dp,frameStart:frameEnd)]; % label,[value,value,...],[value,value,...]...
30 30
             end