You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DumpResults4spss1.m 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. clear;
  2. clc;
  3. name = 'Results4Spss';
  4. dataDir = 'D:/SocialNets/Steam/Exp_March13/Test/Boost_Th20/Iter15_16K_10/';
  5. files = dir(strcat(dataDir, 'res_Steam*.mat'));
  6. dateNow = clock;
  7. dateNow = strcat(num2str(dateNow(1)),'_',num2str(dateNow(2)),'_', num2str(dateNow(3)),'_', num2str(dateNow(4)), num2str(dateNow(5)),'_', num2str(dateNow(6)));
  8. outFile = sprintf('%sDump%s_%s.txt',dataDir, name, dateNow);
  9. fileID = fopen(outFile,'w');
  10. first = 1;
  11. numAlg = 0;
  12. for f = files'
  13. data = load(strcat(dataDir,f.name));
  14. numResults = size(data.purity,2);
  15. numMissing = size(data.removed_nodes,2);
  16. line = numResults/numMissing;
  17. numAlgVars = line/numAlg;
  18. % print header
  19. if first == 1
  20. fprintf(fileID,'file\tinx\titer\tnodes\tedges\tattEdges\tattNodes\tmissInx\tmissNum\tnumPHs\tavgPHs');
  21. fprintf(fileID,'\tAlgId\tAttr\tScore\tTime1\tTime2\tTotalTime\n');
  22. first = 0;
  23. end
  24. %print data
  25. for i=1:numResults
  26. r = data.purity(1,i);
  27. fprintf(fileID,'%s',data.file);
  28. fprintf(fileID,'\t%d',data.i);
  29. fprintf(fileID,'\t%d',data.iter);
  30. fprintf(fileID,'\t%d',r.graph_size);
  31. fprintf(fileID,'\t%d',r.graph_edges); %12.12.12
  32. fprintf(fileID,'\t%d',r.graph_attr_edges); % 12.12.12
  33. fprintf(fileID,'\t%d', data.purity(1,i).num_attr_nodes);
  34. fprintf(fileID,'\t%d',r.num_missing_nodes_idx);
  35. fprintf(fileID,'\t%d',r.num_missing_nodes);
  36. fprintf(fileID,'\t%d',r.num_placeholders);
  37. fprintf(fileID,'\t%d',r.num_placeholders/r.num_missing_nodes);
  38. fprintf(fileID,'\t%d',r.affinity_calculation_type);
  39. fprintf(fileID,'\t%d',r.withAttr);
  40. fprintf(fileID,'\t%d',r.score);
  41. time1 = r.affinity_calc_time+r.reduce_dim_time+r.graph_predict_time;
  42. time2 = r.att_affinity_calc_time;
  43. fprintf(fileID,'\t%d',time1);
  44. fprintf(fileID,'\t%d',time2);
  45. fprintf(fileID,'\t%d',time1+time2);
  46. fprintf(fileID,'\n');
  47. end
  48. end
  49. fclose(fileID);
  50. LogMsg(sprintf('Completed DumpResults at%s',outFile));