clc;
close all;
clear all;

test_dirs = {'2526_00_47_53_05-events', '2526_00_52_53_05-events', ...  
             '2526_00_53_53_05-events', '2526_00_57_53_05-events', ...
             '2526_00_58_53_05-events', '2526_01_00_53_05-events', ...
             '2526_01_01_53_05-events', '2526_01_02_53_05-events'};
         
classes = {'leuk', 'other', 'rath'};
results = [];%{};
for ts = 1:8

%     load([test_dirs{ts} '-prob']);
%     table = event_classifier_results(3:end,:);
%     for k=1:size(table,1)
%         table{k,1} = evt_number([table{k,1} '_']);
%     end    
%     results = [results; sortrows(table,1)];    

    load(['probtable' test_dirs{ts}]);
    files = probtable.files;
    
    fn = zeros(size(files,2),1);
    
    for k=1:size(files,2)
        fn(k) = evt_number(files{k}{1});
    end
    
    table = [fn probtable.data];  
    table = sortrows(table,1);
    
    evts = unique(table(:,1));
    new_results = zeros(length(evts), 1);
        
    for k=1:length(evts)
        indx = table(:,1)==evts(k);
        [val, new_results(k)] = max(sum(table(indx,2:4)));
    end
    
    results = [results; new_results];    

end
