Example #1
0
        public override int Run(string[] args)
        {
            Console.WriteLine("Start");
            fill_params(args);
            Console.WriteLine("Params get \nfile in {0} \n", file_in);

            Class_learn_set = BaseUFSLoader.LoadLearnFromUFS(file_in);
            Console.WriteLine("Tra load");

            Class_test_set = BaseUFSLoader.LoadTestFromUFS(file_in);
            Console.WriteLine("Tst load");
            conf = new PSOBacterySearchConf();
            conf.Init(Class_learn_set.CountVars);
            conf.loadParams(confParams);
            Console.WriteLine("Conf Filed");

            Class_Pittsburg = new PCFuzzySystem(Class_learn_set, Class_test_set);
            Class_Pittsburg = PCFSUFSLoader.loadUFS(Class_Pittsburg, file_in);

            Console.WriteLine("Classifier created");
            optimaze        = new Term_config_PSO_Bactery();
            Class_Pittsburg = optimaze.TuneUpFuzzySystem(Class_Pittsburg, conf);
            Console.WriteLine("Optimization complite");
            PCFSUFSWriter.saveToUFS(Class_Pittsburg, file_out);
            Console.WriteLine("Saved");
            return(1);
        }
Example #2
0
        public override int Run(string[] args)
        {
            Console.WriteLine("Start");
            fill_params(args);
            Console.WriteLine("Params get \nfile in {0} \n", file_in);

            Approx_learn_set = BaseUFSLoader.LoadLearnFromUFS(file_in);
            Console.WriteLine("Tra load");

            Approx_test_set = BaseUFSLoader.LoadTestFromUFS(file_in);
            Console.WriteLine("Tst load");
            conf = new PSOBacterySearchConf();
            conf.Init(Approx_learn_set.CountVars);
            conf.loadParams(confParams);
            Console.WriteLine("Conf Filed");

            Approx_Singletone = new SAFuzzySystem(Approx_learn_set, Approx_test_set);
            Approx_Singletone = SAFSUFSLoader.loadUFS(Approx_Singletone, file_in);

            Console.WriteLine("Classifier created");
            optimaze          = new PSOMethods.Approx.Term_config_PSO_Bactery();
            Approx_Singletone = optimaze.TuneUpFuzzySystem(Approx_Singletone, conf);
            Console.WriteLine("Optimization complite");
            SAFSUFSWriter.saveToUFS(Approx_Singletone, file_out);
            Console.WriteLine("Saved");
            return(1);
        }
        public override ILearnAlgorithmConf getConf(int CountFeatures)
        {
            ILearnAlgorithmConf result = new PSOBacterySearchConf();

            result.Init(CountFeatures);
            return(result);
        }