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.

PrepareDataset2.m 1.1KB

1234567891011121314151617181920212223242526272829
  1. clear;
  2. clc;
  3. %datasetDir = 'D:/SocialNets/Steam/Exp_June13/Test/' ; % sigal 18.11.12
  4. datasetDir = 'D:/SocialNets/DataSets5/FF50c_Steam_GM2_GR2_60/Test_250K/';
  5. filePrefix = 'Steam*_';
  6. netSizes = 100000; %[1000 2000 2048 4096]; % 5000 8192 10000 16384]; %100000 %[2048 4096 5000 8192 10000 16384 20000 25000 32768 50000 75000 100000];
  7. debug = 0;
  8. % convert ascii graph to .mat data graph
  9. fprintf('Start prepareDataSet ...\n');
  10. for nodes = netSizes
  11. prefix = sprintf('%s%s%d_%s',datasetDir,filePrefix,nodes,'*.txt');
  12. files = [dir(prefix)];
  13. for i = 1:size(files,1)
  14. file = files(i).name;
  15. usrFile = strfind(file, '.usr');
  16. matFile = strfind(file, '.mat');
  17. if isempty(usrFile) && isempty(matFile)
  18. fprintf('dataSet %s ...\n',file);
  19. [data] = LoadAsciiGraph(datasetDir, file, nodes, debug);
  20. %[edges] = SaveAsciiGraph(strcat(datasetDir,testDir), file, data);
  21. save(strcat(datasetDir,'matFormat/',file,'.mat'), 'data');
  22. end
  23. end
  24. end
  25. fprintf('Completed Run.\n');