public static void Entry1() { string folder = @"D:\Project\StreamingRoseRiver\EbolaCaseStudyFinal\RoseRiver\Data\KddInfovisGraphicsIndex_Lucene_a=0.003_sm=1-test\"; int largestTopicID = 10000; //0 //largestTopicID = -1; var tree = BRTAnalysis.ReadTree(folder + "0.gv.bak", false); BRTAnalysis.WriteTree(BRTAnalysis.GetCopiedTree(tree, 2, ref largestTopicID), folder + "0.gv"); //1 //largestTopicID = -1; tree = BRTAnalysis.ReadTree(folder + "1.gv.bak", false); BRTAnalysis.WriteTree(BRTAnalysis.GetCopiedTree(tree, 2, ref largestTopicID), folder + "1.gv"); var ctree = BRTAnalysis.ReadTree(folder + "1c_i.gv.bak", false, true); BRTAnalysis.WriteTree(BRTAnalysis.GetCopiedTree(ctree, 2, ref largestTopicID), folder + "1c_i.gv"); var projInfos = BRTAnalysis.ReadProjectManyInfos(folder + "1c_proj_many.bin.bak"); BRTAnalysis.WriteProjectManyInfos(BRTAnalysis.GetCopiedProjectManyInfos(projInfos, 2, largestTopicID), folder + "1c_proj_many.bin"); Util.ProgramFinishHalt(); }
//public void StartEbola(int[] focusSeeds) public void StartEbola() { // -- node counts -- string folder = @"D:\Project\StreamingRoseRiver\EbolaCaseStudyFinal\Trees3\"; string exeFolder = @"D:\Project\StreamingRoseRiver\EbolaCaseStudyFinal\RoseRiver\RoseRiver\bin\x64\Release\"; if (!Directory.Exists(folder)) { folder = @"H:\Xiting\StreamingRoseRiver\ScalabilityExperiment\Data\Trees3\"; exeFolder = @"H:\Xiting\StreamingRoseRiver\ScalabilityExperiment\RoseRiverExe\"; } if (!Directory.Exists(folder)) { folder = @"D:\Documents\roseriver\RoseRiver\RoseRiver\Data\Ebola\Trees3\"; exeFolder = @"D:\Documents\roseriver\RoseRiver\RoseRiver\Data\Ebola\ScalabilityExperiment\RoseRiver\RoseRiver\bin\x64\Release\"; } List <int> nodeCounts = new List <int>(); for (int i = 0; i < 30; i++) { var fileName = folder + i + ".gv"; var tree = BRTAnalysis.ReadTree(fileName); nodeCounts.Add(tree.BFS(tree.Root).Count()); } // -- experiment -- var copyFactors = new[] { 1 }; //Util.GetIntArray(1, 9, 2); //new[] {1, 2, 5, 10, 20, 50}; var focusCounts = new[] { 1, 3, 5 }; //DataProcess.Utils.Util.GetIntArray(1, 5); //var focusSampleCount = 1;//50; var focusSeeds = Util.GetIntArray(51, 100); //Util.GetIntArray(1, 50); //new[] { 1 };//Util.GetIntArray(1, 50); //var minMaxTreeCount = 10; //var maxMaxTreeCount = 30; var treeCounts = Util.GetIntArray(5, 30); //new int[] { 5, 10 };//new[] {10, 20}; int index = 0; ProgramProgress progress = new ProgramProgress(copyFactors.Length * focusCounts.Length * focusSeeds.Length * treeCounts.Length); var configure = new TopicStreamConfigure(); foreach (int focusSeed in focusSeeds) { foreach (var copyFactor in copyFactors) { configure.CopyFactor = copyFactor; foreach (var focusCount in focusCounts) { configure.FocusCount = focusCount; configure.DefaultTreeCut = GetRandomManuallyTreeCut(focusCount, treeCounts.Min(), focusSeed, nodeCounts, 1); configure.DefaultTreeCutRandomSeed = focusSeed; foreach (var treeCount in treeCounts) { if (File.Exists("RunTimeExperiment\\" + index + ".txt")) { Console.WriteLine("Skip index = " + index); index++; progress.PrintSkipExperiment(); continue; } configure.TreeCount = treeCount; configure.Index = index; configure.Write(); File.Copy(TopicStreamConfigure.ConfigureFileName, exeFolder + TopicStreamConfigure.ConfigureFileName, true); ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.ErrorDialog = false; startInfo.CreateNoWindow = false; startInfo.UseShellExecute = false; startInfo.FileName = exeFolder + @"RoseRiver.exe"; startInfo.WindowStyle = ProcessWindowStyle.Normal; using (Process exeProcess = Process.Start(startInfo)) { exeProcess.WaitForExit(); } progress.PrintIncrementExperiment("\n"); index++; } } } } progress.PrintTotalTime(); }
public void StartKDD() { // -- node counts -- string folder = @"D:\Project\StreamingRoseRiver\EbolaCaseStudyFinal\RoseRiver\Data\KddInfovisGraphicsIndex_Lucene_a=0.003_sm=1\"; string exeFolder = @"D:\Project\StreamingRoseRiver\EbolaCaseStudyFinal\RoseRiver\RoseRiver\bin\x64\Release\"; List <int> nodeCounts = new List <int>(); for (int i = 0; i < 11; i++) { var fileName = folder + i + ".gv"; var tree = BRTAnalysis.ReadTree(fileName); nodeCounts.Add(tree.BFS(tree.Root).Count()); } // -- experiment -- var copyFactors = new[] { 2, 1 }; var focusCounts = DataProcess.Utils.Util.GetIntArray(1, 5); var focusSampleCount = 5; var minMaxTreeCount = 6; var maxMaxTreeCount = 8; int index = 0; ProgramProgress progress = new ProgramProgress(copyFactors.Length * focusCounts.Length * focusSampleCount * (maxMaxTreeCount - minMaxTreeCount + 1)); var configure = new TopicStreamConfigure(); configure.DataType = "kdd"; foreach (var copyFactor in copyFactors) { configure.CopyFactor = copyFactor; foreach (var focusCount in focusCounts) { for (int iFocusSample = 0; iFocusSample < focusSampleCount; iFocusSample++) { configure.FocusCount = focusCount; configure.DefaultTreeCut = GetRandomManuallyTreeCut(focusCount, minMaxTreeCount, iFocusSample, nodeCounts, 1); configure.DefaultTreeCutRandomSeed = iFocusSample; for (int iMaxTreeCount = minMaxTreeCount; iMaxTreeCount <= maxMaxTreeCount; iMaxTreeCount++) { configure.TreeCount = iMaxTreeCount; configure.Index = index; configure.Write(); File.Copy(TopicStreamConfigure.ConfigureFileName, exeFolder + TopicStreamConfigure.ConfigureFileName, true); ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.CreateNoWindow = true; startInfo.UseShellExecute = false; startInfo.FileName = exeFolder + @"RoseRiver.exe"; startInfo.WindowStyle = ProcessWindowStyle.Hidden; using (Process exeProcess = Process.Start(startInfo)) { exeProcess.WaitForExit(); } progress.PrintIncrementExperiment("\n"); index++; } } } } progress.PrintTotalTime(); }