clear; clc; dump_ged = 0; dump_time = 0; dump_addMissingAtt = 1; dump_AttThPect = 0; if dump_ged == 1 name = 'GED'; elseif dump_time == 1 name = 'Time'; else name = 'Results'; end dataDir = 'D:/SocialNets/__Steam/_Exp_Oct13/Train/results8_Th35_2K_Train/F1022_Iter_1120/'; dataDir = 'D:/__SN_Oct13/Results/compareTh_KM8_10K_b/F922_Iter_15/'; %dataDir = 'D:/__SN_Oct13/Results/results9_Th358_101K/F922_Iter_44/'; % dataDir = 'D:/__SN_Jan14_FF50/Results/results9_Th358_100K/F922_Iter_810/'; % dataDir = 'D:/__SN_Jan14_FF75/Datasets_10K/testImgA/F922_Iter_14_R2M2/'; %dataDir = 'D:/__SN_Jan14_FF75/Datasets_10K/testImg_noTh_10000/F922_I2P1M0_Iter_15/'; files = dir(strcat(dataDir, 'res_*.mat')); dateNow = clock; dateNow = strcat(num2str(dateNow(1)),'_',num2str(dateNow(2)),'_', num2str(dateNow(3)),'_', num2str(dateNow(4)), num2str(dateNow(5)),'_', num2str(dateNow(6))); outFile = sprintf('%sDump%s_%s.txt',dataDir, name, dateNow); fileID = fopen(outFile,'w'); first = 1; numAlg = 0; for f = files' data = load(strcat(dataDir,f.name)); numResults = size(data.purity,2); numMissing = size(data.removed_nodes,2); line = numResults/numMissing; % print header if first == 1 fprintf(fileID,'\tfile\tinx\titer\tnodes\tedges\tattEdges\tattNodes\tmissInx\tmissNum\tnumPHs\tavgPHs'); for i=1:line r=data.purity(1,i); if dump_addMissingAtt == 1 || dump_AttThPect == 1 if r.withAttr == 0 && r.affinity_calculation_type ~= 9 numAlg = numAlg+1; end p = r.addMissingAtt; if r.addMissingAtt == 1 p = 0; end if dump_AttThPect == 1 && r.attThPect < 1 p = r.attThPect*10; end fprintf(fileID,'\t%d',p*100000+r.affinity_calculation_type*1000+r.withAttr); else if r.withAttr == 0 && r.affinity_calculation_type ~= 9 fprintf(fileID,'\t%d_Orig',r.affinity_calculation_type); numAlg = numAlg+1; else %fprintf(fileID,'\t%d_Att%d',r.affinity_calculation_type,r.withAttr); fprintf(fileID,'\t%d_%d',r.affinity_calculation_type,r.withAttr); end end end fprintf(fileID,'\n'); first = 0; end numAlgVars = line/numAlg; %print data for i=1:numResults r = data.purity(1,i); if mod(i,line)==1 || numResults==1 fprintf(fileID,'\t%s',data.file); fprintf(fileID,'\t%d',data.i); fprintf(fileID,'\t%d',data.iter); fprintf(fileID,'\t%d',r.graph_size); fprintf(fileID,'\t%d',r.graph_edges); %12.12.12 fprintf(fileID,'\t%d',r.graph_attr_edges); % 12.12.12 fprintf(fileID,'\t%d', data.purity(1,i).num_attr_nodes); fprintf(fileID,'\t%d',r.num_missing_nodes_idx); fprintf(fileID,'\t%d',r.num_missing_nodes); fprintf(fileID,'\t%d',r.num_placeholders); fprintf(fileID,'\t%d',r.num_placeholders/r.num_missing_nodes); end % if mod(i,numAlgVars)==1 % fprintf(fileID,'\t'); % place for min calculation % end if dump_ged == 1 fprintf(fileID,'\t%d',r.edit_distance); elseif dump_time == 1 total_time = r.affinity_calc_time+r.reduce_dim_time+r.graph_predict_time+r.att_affinity_calc_time; fprintf(fileID,'\t%d',total_time); else fprintf(fileID,'\t%d',r.score); end if mod(i,line)==0 fprintf(fileID,'\n'); end end end fclose(fileID); LogMsg(sprintf('Completed Dump%s at%s',name,outFile));