How to convert DMP Psuedo code in Matlab code
2 views (last 30 days)
Show older comments
I have read the solution of the other question that relate my question but I still don't understand.
Thank you a lot for youe help
Input: Training data D = {(x1, y1), (x2, y2), . . . ,(xn 0 sam , yn 0 sam )}, Set Ftop of selected features
Output: Classifier (8, b, Ftop)
1: Initialize parameter C for the linear SVM
2: Initialize mupper
3: Put mlower = round(0.2mupper), mbad = 0, mrev = 0, m = 0, nstop = round(0.20n 0 sam), 8 = [ ], E = [ ]
4: repeat
5: m = m + 1
6: Partition D into three random sets (D (m) train, D (m) test, D (m) disc)
7: Obtain the MP subclassifier φm = MPTrain(D (m) train, nstop)
8: Calculate the error rate em of subclassifier φm on the testing subsamples D (m) test 9: Append φm to list 8
10: Append em to list E
11: Put e¯ = 1 m Pm `=1 e`
12: if em > 2e¯ then
13: mbad = mbad + 1 14: end if
15: if em ≥ 0.5 then
16: mrev = mrev + 1
17: end if
18: until (mlower ≤ m < mupper and mbad > 0.2mupper) or
m = mupper
19: if mrev > 0.5mlower then
20: b = true
21: else
22: b = false
23: end if
24: return (8, b, Ftop)
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!