refactored LabelMap getter with lm prefix.
Christoph Budziszewski

Christoph Budziszewski commited on 2009-03-06 12:49:18
Zeige 8 geänderte Dateien mit 10 Einfügungen und 10 Löschungen.


git-svn-id: https://svn.discofish.de/MATLAB/spmtoolbox/SVMCrossVal@144 83ab2cfd-5345-466c-8aeb-2b2739fb922d
... ...
@@ -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
... ...
@@ -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
... ...
@@ -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;
... ...
@@ -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
... ...
@@ -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
... ...
@@ -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,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
31 31