Changeset 113
- Timestamp:
- 08/31/16 15:25:22 (8 years ago)
- Location:
- prextra
- Files:
-
- 35 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
prextra/emc.m
r109 r113 45 45 if size(a,2) ~= size(b,2) 46 46 error('Datasets should have same number of features') 47 47 end 48 48 49 borg = setlabels(b,getnlab(b)); 49 50 c = getsize(a,3); 50 51 epsilon = 1e-6; … … 65 66 w = a*classf; 66 67 68 starttime = clock; 69 runtime = 0; 70 iter = 0; 67 71 while change > epsilon 72 disp(borg*w*testd) 73 if runtime > prtime 74 prwarning(2,['EM algorithme stopped by PRTIME after ' num2str(iter) ' iterations']); 75 break 76 end 68 77 d = b*w; 69 78 switch labtype … … 81 90 c = [setlabtype(a,labtype); b]; 82 91 w = c*classf; 92 runtime = etime(clock,starttime); 93 iter = iter+1; 83 94 end 84 95
Note: See TracChangeset
for help on using the changeset viewer.