Browse code

new LabelMap new svm grouping method missing files

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

Christoph Budziszewski authored on07/01/2009 18:27:21
Showing5 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,13 @@
1
+function display(map)
2
+    disp(' ');
3
+    disp([inputname(1),' : '])
4
+       disp(sprintf('Condition To Label Map'))
5
+       disp(map.ConditionToLabel)
6
+       disp(sprintf('Label To Condition Map'))
7
+       disp(map.LabelToCondition)
8
+       disp(sprintf('Label To Value Map'))
9
+       disp(map.LabelToValue)
10
+       disp(sprintf('Value To Label Map'))
11
+       disp(map.ValueToLabel)
12
+        
13
+end
0 14
\ No newline at end of file
1 15
new file mode 100644
... ...
@@ -0,0 +1,7 @@
1
+function classCells = getClasses(mapping)
2
+    hset = mapping.LabelToValue.keySet;
3
+    hset = hset.toArray;
4
+    for item = 1:hset.length
5
+        classCells{item} = hset(item);
6
+    end
7
+end
0 8
\ No newline at end of file
1 9
new file mode 100644
... ...
@@ -0,0 +1,11 @@
1
+function conditionvector = getCondition(mapping,label)
2
+if mapping.LabelToCondition.containsKey(label)
3
+    hset = mapping.LabelToCondition.get(label);
4
+    hset = hset.toArray;
5
+    conditionvector = [];
6
+    for item = 1:hset.length
7
+        conditionvector = [conditionvector hset(item)];
8
+    end
9
+else
10
+     error('LabelMap:getLabel:noSuchValue','this Mapping does not contain a Value %d',condition);
11
+end
0 12
\ No newline at end of file
1 13
new file mode 100644
... ...
@@ -0,0 +1,9 @@
1
+function m = getPSTEventMatrix(mapping)
2
+    m = [];
3
+    size(mapping.LabelToCondition.keySet)
4
+    for key = 1:size(mapping.LabelToCondition.keySet)
5
+        label = mapping.LabelToCondition.keySet.toArray;
6
+        label = label(key);
7
+        m = [m ; getCondition(mapping,label)];
8
+    end
9
+end
0 10
\ No newline at end of file
1 11
new file mode 100644
... ...
@@ -0,0 +1,3 @@
1
+function svmlabel = getSVMLabel(mapping,condition)
2
+    svmlabel = getValue(mapping,getLabel(mapping,condition));
3
+end
0 4
\ No newline at end of file