Example #1
0
        //  public const string databaseAccessesPath = @"C:\Users\Yuval\Desktop\Data\Traffic of Database Accesses\trimmed.csv";

        private static void RunMilanoPhonesSecondMomentSketch(Random random)
        {
            //int numOfNodes     = 25;
            // var dimensions     = new[] { (9, 9)};
            var window = 24;

            // foreach (var numOfNodes in ArrayUtils.Init(16, 36, 64, 100, 144, 13 * 13, 14 * 14))
            foreach (var numOfNodes in ArrayUtils.Init(4)
                     .Select(x => x * x))
            {
                var distributingMethod = new GridDistributing(1, 10000, numOfNodes);
                //var approximation  = new MultiplicativeUpperLowerApproximation(0.3, 3.0);
                //var approximation  = new ThresholdApproximation(2700000);
                //var approximation = new CombinedApproximation(new MultiplicativeUpperLowerApproximation(0.5, 2.0),
                //                                              new AdditiveApproximation(100000));
                //  foreach (var approximation in ArrayUtils.Init(100000, 200000, 300000, 400000, 500000, 700000, 900000, 1100000, 1300000, 1600000, 1900000, 2200000, 2500000).Select(x => new AdditiveApproximation(x)))
                {
                    var width         = 14;
                    var height        = 11;
                    var approximation = new AdditiveApproximation(0.5E06);
                    //foreach (var (width, height) in ArrayUtils
                    //                             .Init(2, 5, 10, 14, 18, 22, 27, 31, 36, 40, 45, 50, 54, 59, 63, 68, 72, 77, 81, 86, 90)
                    //                           .Select(x => (14, x)))
                    SecondMomentRunner.RunMilanoPhoneActivity(random, numOfNodes, window, approximation, width, height, distributingMethod, phoneActivitiesBaseFolder, resultDir);
                }
            }
        }
Example #2
0
        private static void RunCtuSketchEntropy(Random random)
        {
            //var numOfNodes             = 12;
            var window        = 60 * 6;
            var approximation = new AdditiveApproximation(0.5);
            var maxIterations = 4000;

            for (int numOfNodes = 10; numOfNodes <= 10; numOfNodes += 10)
            {
                for (var reducedSketchDimension = 200; reducedSketchDimension <= 200; reducedSketchDimension += 100)
                {
                    EntropySketchRunner.RunCTU(random, maxIterations, numOfNodes, window, reducedSketchDimension, approximation,
                                               ctuFilePath, resultDir);
                }
            }
        }