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.

PrepareDataset.m 1.1KB

123456789101112131415161718192021222324252627282930
  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 = [2048 4096 5000 8192 16384 20000 25000 32768]; % 50000 75000 100000];
  7. netSizes = [50000 75000]; %[2048 4096 8192 16384 32768]; % 10000 25000 50000 75000 100000];
  8. debug = 0;
  9. % convert ascii graph to .mat data graph
  10. fprintf('Start prepareDataSet ...\n');
  11. for nodes = netSizes
  12. prefix = sprintf('%s%s%d_%s',datasetDir,filePrefix,nodes,'*.txt');
  13. files = [dir(prefix)];
  14. for i = 1:size(files,1)
  15. file = files(i).name;
  16. usrFile = strfind(file, '.usr');
  17. matFile = strfind(file, '.mat');
  18. if isempty(usrFile) && isempty(matFile)
  19. fprintf('dataSet %s ...\n',file);
  20. [data] = LoadAsciiGraph(datasetDir, file, nodes, debug);
  21. %[edges] = SaveAsciiGraph(strcat(datasetDir,testDir), file, data);
  22. save(strcat(datasetDir,'matFormat/',file,'.mat'), 'data');
  23. end
  24. end
  25. end
  26. fprintf('Completed Run.\n');