Exemple #1
0
        public static void CompareSizeOfLoadedInstance(string file = "test")
        {
            Helpers.Utils.Debug("Running Memory Size Comparing-Test..");
            Stopwatch sw = new Stopwatch(); sw.Start();

            Loader.ArffLoader al = new Loader.ArffLoader(file);
            al.loadArff();

            ArffInstance ai = al.getInstance();

            long t = sw.ElapsedMilliseconds;

            Helpers.Utils.Debug(string.Format("Read & Parsed ARFF file in {0} ms.", t));

            SimpleArffInstance si = new SimpleArffInstance(ai);

            long t2 = sw.ElapsedMilliseconds;

            Helpers.Utils.Debug(string.Format("Converting complex instance in {0} ms.", (t2 - t)));

            Helpers.Utils.Debug(string.Format("Simple Instance Size: {0} Kb.", si.GetMemorySize()));
            Helpers.Utils.Debug(string.Format("Complex Instance Size: {0} Kb.", ai.GetMemorySize()));

            Helpers.Utils.Debug(string.Format("Finished, took {0} ms.", sw.ElapsedMilliseconds));
        }
Exemple #2
0
        public static void LoadArffFileAndRunAprioriWithWekaOutput(string file = "test")
        {
            Helpers.Utils.Debug(string.Format("Running apriori on ARFF file, with WEKA output, {0}.arff..", file));
            Stopwatch sw = new Stopwatch(); sw.Start();

            Loader.ArffLoader al = new Loader.ArffLoader(file);
            al.loadArff();

            ArffInstance ai = al.getInstance();

            ai.Datasets.removeEmptyValueDatasets();

            long t = sw.ElapsedMilliseconds;

            Helpers.Utils.Debug(string.Format("Read & Parsed ARFF file in {0} ms.", t));

            new Ceka.Algorithms.Associaters.Apriori(ai, 0.1f, 0.5f, true, true, AprioriSaveTypes.WEKA);

            Helpers.Utils.Debug(string.Format("Finished, took {0} ms.", sw.ElapsedMilliseconds));
            sw.Stop();
        }
        public static void CompareSizeOfLoadedInstance(string file = "test")
        {
            Helpers.Utils.Debug("Running Memory Size Comparing-Test..");
            Stopwatch sw = new Stopwatch(); sw.Start();

            Loader.ArffLoader al = new Loader.ArffLoader(file);
            al.loadArff();

            ArffInstance ai = al.getInstance();

            long t = sw.ElapsedMilliseconds;
            Helpers.Utils.Debug(string.Format("Read & Parsed ARFF file in {0} ms.", t));

            SimpleArffInstance si = new SimpleArffInstance(ai);

            long t2 = sw.ElapsedMilliseconds;
            Helpers.Utils.Debug(string.Format("Converting complex instance in {0} ms.", (t2 - t)));

            Helpers.Utils.Debug(string.Format("Simple Instance Size: {0} Kb.", si.GetMemorySize()));
            Helpers.Utils.Debug(string.Format("Complex Instance Size: {0} Kb.", ai.GetMemorySize()));

            Helpers.Utils.Debug(string.Format("Finished, took {0} ms.", sw.ElapsedMilliseconds));
        }
        public static void LoadArffFileAndRunAprioriWithWekaOutput(string file = "test")
        {
            Helpers.Utils.Debug(string.Format("Running apriori on ARFF file, with WEKA output, {0}.arff..", file));
            Stopwatch sw = new Stopwatch(); sw.Start();

            Loader.ArffLoader al = new Loader.ArffLoader(file);
            al.loadArff();

            ArffInstance ai = al.getInstance();
            ai.Datasets.removeEmptyValueDatasets();

            long t = sw.ElapsedMilliseconds;
            Helpers.Utils.Debug(string.Format("Read & Parsed ARFF file in {0} ms.", t));

            new Ceka.Algorithms.Associaters.Apriori(ai, 0.1f, 0.5f, true, true, AprioriSaveTypes.WEKA);

            Helpers.Utils.Debug(string.Format("Finished, took {0} ms.", sw.ElapsedMilliseconds));
            sw.Stop();
        }