summaryrefslogtreecommitdiffstats
path: root/SD-VBS/benchmarks/svm/src/matlab/examineExample.m
diff options
context:
space:
mode:
authorleochanj <jbakita@cs.unc.edu>2020-10-21 01:52:54 -0400
committerleochanj <jbakita@cs.unc.edu>2020-10-21 15:59:54 -0400
commit0efc775370d2ff91927d1b383a99eab78dc5538f (patch)
treea41fe470fee5adc4d944ecd6b917bc48df8c7e0f /SD-VBS/benchmarks/svm/src/matlab/examineExample.m
parente2b50015cebdfba68699abd6e8575e38230f5a78 (diff)
debug libextra and remove matlab
FLUSH_CACHES
Diffstat (limited to 'SD-VBS/benchmarks/svm/src/matlab/examineExample.m')
-rw-r--r--SD-VBS/benchmarks/svm/src/matlab/examineExample.m60
1 files changed, 0 insertions, 60 deletions
diff --git a/SD-VBS/benchmarks/svm/src/matlab/examineExample.m b/SD-VBS/benchmarks/svm/src/matlab/examineExample.m
deleted file mode 100644
index a60ee13..0000000
--- a/SD-VBS/benchmarks/svm/src/matlab/examineExample.m
+++ /dev/null
@@ -1,60 +0,0 @@
1function [a,b,e,ret]=examineExample(i, a, b, C, e, X, Y, tolerance, N, eps, dim)
2
3ret = 0;
4if (a(i,1) > 0) && (a(i,1) < C)
5 E = e(i,1);
6else
7 E = cal_learned_func(i, a, b, N, Y, X, dim) - Y(i,1);
8end
9
10 r1 = Y(i,1) * E;
11
12 if (r1 < -1*tolerance && a(i,1) < C) || (r1 > tolerance && a(i,1) > 0)
13 %case1 argmax E-E2%
14 maxEDiff=0;
15 j=i;
16 for k=1:N
17 if a(k,1) > 0 && a(k,1) < C
18 temp= abs(E - e(k,1));
19 if temp > maxEDiff
20 j=k;
21 end
22 end
23 end
24
25 if i~=j
26 [a,b,e,ret]=takeStep(i, j, a, C, e, Y, X, eps, b, N, dim);
27 end
28
29 if(ret ~=1)
30 %iterate through the non-bound example%
31% for k=round(randWrapper(1,1)*(N-2))+1:N
32 randVal = 1.0;
33 for k=(randVal*(N-1)):N
34 if (a(k,1) > 0 && a(k,1) < C && ret == 0)
35% if (i == k)
36% ret = 0;
37% else
38 [a,b,e,ret]=takeStep(i, k, a, C, e, Y, X, eps, b, N, dim);
39% end
40 end
41 end
42 end
43
44 if(ret ~= 1)
45 %iter for entire training set%
46 for k=1:N
47 if(ret == 0)
48% if (i == k)
49% ret = 0;
50% else
51 [a,b,e,ret]=takeStep(i, k, a, C, e, Y, X, eps, b, N, dim);
52% end
53 end
54 end
55 end
56
57 else
58
59end
60