public bool UseChangePointAnalyzer()
        {
            try
            {
                // Run Cpa Analysis and Write as Meta File
                foreach (KeyValuePair <string, double[]> entry in Dic_trendFpiArr)
                {
                    ChangePointAnalyzer CpaFpi = new ChangePointAnalyzer();
                    CpaFpi._dataPath = AppDomain.CurrentDomain.BaseDirectory
                                       + @"Meta\" + "trendFpi_" + entry.Key + ".txt";
                    CpaFpi._hasHeader           = false;
                    CpaFpi._docsize             = 177;
                    CpaFpi._docName             = "ChangePointsFpi_" + entry.Key;
                    CpaFpi.Confidence           = 95;
                    CpaFpi.SlidingWindowDivided = 30;
                    CpaFpi.RunAnalysis();
                }

                // Read Meta and Output an Integrated Auto Data CSV
                ReadMetaAndOutputAnIntegratedAutoDataCSV();

                return(true);
            }
            catch (Exception e)
            {
                return(false);
            }
        }
예제 #2
0
        public void UC01_TestCPA_Fpi()
        {
            ChangePointAnalyzer Cpa = new ChangePointAnalyzer();

            //Cpa._dataPath = @"C:\Workspace\Branches\CircularEconomyAndGreenTechnology\EconomicMoat\EconomicMoat\EconomicMoats.ModuleTest\ChangePointAnalysis\Data\FPI_jul20_CPA.csv";
            Cpa._dataPath = @"C:\Workspace\Branches\CircularEconomyAndGreenTechnology\EconomicMoat\EconomicMoat\EconomicMoats.ModuleTest\ChangePointAnalysis\Data\FpiAfterSsaAsTrend.csv";
            Cpa._docsize  = 366;
            Cpa.RunAnalysis();
        }
        public bool UseChangePointAnalyzer()
        {
            try
            {
                ChangePointAnalyzer CpaFpi = new ChangePointAnalyzer();
                CpaFpi._dataPath = AppDomain.CurrentDomain.BaseDirectory
                                   + @"Meta\" + "trendFpi" + ".csv";
                CpaFpi._hasHeader           = false;
                CpaFpi._docsize             = 366;
                CpaFpi._docName             = "ChangePointsFpi";
                CpaFpi.Confidence           = 95;
                CpaFpi.SlidingWindowDivided = 30;   // 6
                CpaFpi.RunAnalysis();

                ChangePointAnalyzer CpaMpi = new ChangePointAnalyzer();
                CpaMpi._dataPath = AppDomain.CurrentDomain.BaseDirectory
                                   + @"Meta\" + "trendMpi" + ".csv";
                CpaMpi._hasHeader           = false;
                CpaMpi._docsize             = 366;
                CpaMpi._docName             = "ChangePointsMpi";
                CpaMpi.Confidence           = 95;
                CpaMpi.SlidingWindowDivided = 40;   // 6
                CpaMpi.RunAnalysis();

                ChangePointAnalyzer CpaDpi = new ChangePointAnalyzer();
                CpaDpi._dataPath = AppDomain.CurrentDomain.BaseDirectory
                                   + @"Meta\" + "trendDpi" + ".csv";
                CpaDpi._hasHeader           = false;
                CpaDpi._docsize             = 366;
                CpaDpi._docName             = "ChangePointsDpi";
                CpaDpi.Confidence           = 94;
                CpaDpi.SlidingWindowDivided = 30;   // 5
                CpaDpi.RunAnalysis();

                ChangePointAnalyzer CpaCpi = new ChangePointAnalyzer();
                CpaCpi._dataPath = AppDomain.CurrentDomain.BaseDirectory
                                   + @"Meta\" + "trendCpi" + ".csv";
                CpaCpi._hasHeader           = false;
                CpaCpi._docsize             = 366;
                CpaCpi._docName             = "ChangePointsCpi";
                CpaCpi.Confidence           = 95;
                CpaCpi.SlidingWindowDivided = 30;   // 6
                CpaCpi.RunAnalysis();

                ChangePointAnalyzer CpaOpi = new ChangePointAnalyzer();
                CpaOpi._dataPath = AppDomain.CurrentDomain.BaseDirectory
                                   + @"Meta\" + "trendOpi" + ".csv";
                CpaOpi._hasHeader           = false;
                CpaOpi._docsize             = 366;
                CpaOpi._docName             = "ChangePointsOpi";
                CpaOpi.Confidence           = 95;
                CpaOpi.SlidingWindowDivided = 30;   // 6
                CpaOpi.RunAnalysis();

                ChangePointAnalyzer CpaSpi = new ChangePointAnalyzer();
                CpaSpi._dataPath = AppDomain.CurrentDomain.BaseDirectory
                                   + @"Meta\" + "trendSpi" + ".csv";
                CpaSpi._hasHeader           = false;
                CpaSpi._docsize             = 366;
                CpaSpi._docName             = "ChangePointsSpi";
                CpaSpi.Confidence           = 95;
                CpaSpi.SlidingWindowDivided = 32;   // 6
                CpaSpi.RunAnalysis();

                return(true);
            }
            catch
            {
                return(false);
            }
        }