Changeset 113


Ignore:
Timestamp:
08/31/16 15:25:22 (8 years ago)
Author:
bduin
Message:
 
Location:
prextra
Files:
35 added
1 edited

Legend:

Unmodified
Added
Removed
  • prextra/emc.m

    r109 r113  
    4545        if size(a,2) ~= size(b,2)
    4646                error('Datasets should have same number of features')
    47         end
     47  end
    4848       
     49  borg = setlabels(b,getnlab(b));
    4950        c = getsize(a,3);
    5051        epsilon = 1e-6;
     
    6566        w = a*classf;
    6667       
     68  starttime = clock;
     69  runtime = 0;
     70  iter = 0;
    6771        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
    6877                d = b*w;
    6978                switch labtype
     
    8190                c = [setlabtype(a,labtype); b];
    8291                w = c*classf;
     92    runtime = etime(clock,starttime);
     93    iter = iter+1;
    8394        end
    8495       
Note: See TracChangeset for help on using the changeset viewer.