new LabelMap new svm grouping method missing files
Christoph Budziszewski

Christoph Budziszewski commited on 2009-01-07 18:27:21
Zeige 5 geänderte Dateien mit 43 Einfügungen und 0 Löschungen.


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