public override ILearnAlgorithmConf getConf(int CountFeatures) { ILearnAlgorithmConf result = new ESConfig(); result.Init(CountFeatures); return(result); }
public override int Run(string[] args) { Console.WriteLine("Start"); fill_params(args); Console.WriteLine("Params get \nfile in {0} ", 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 ESConfig(); conf.Init(Approx_learn_set.CountVars); fill_conf(); 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 ESMethod(); Approx_Singletone = optimaze.TuneUpFuzzySystem(Approx_Singletone, conf); Console.WriteLine("Optimization complite"); SAFSUFSWriter.saveToUFS(Approx_Singletone, file_out); Console.WriteLine("Saved"); return(1); }
private List <ILearnAlgorithmConf> initAlgoritmsConfigs(int CountFeature) { List <ILearnAlgorithmConf> result = new List <ILearnAlgorithmConf>(); if (isTermShrink) { result.Add(new OptimizeTermShrinkAndRotateConf()); } if (isRuleShrink) { result.Add(new OptimizeRullesShrinkConf()); } if (isUnionTerm) { result.Add(new UnionTermsConf()); } if (isLindBreakCross) { result.Add(null); } if (isPSO) { for (int i = 0; i < countPSO; i++) { result.Add(new PSOSearchConf()); } } if (isANT) { for (int i = 0; i < countANT; i++) { result.Add(new MACOSearchConf()); } } if (isBEE) { for (int i = 0; i < countBEE; i++) { result.Add(new BeeStructureConf()); } } if (isES) { for (int i = 0; i < countES; i++) { ESConfig method = new ESConfig(); method.Init(CountFeature); result.Add(method); } } if (isGA) { for (int i = 0; i < countGA; i++) { GeneticConf method = new GeneticConf(); method.Init(CountFeature); result.Add(method); } } /* if (isBFO) * { * for (int i = 0; i < countBFO; i++) * { * BacterialForagingOptimization.Base.BacteryAlgorithmConfig method = new BacterialForagingOptimization.Base.BacteryAlgorithmConfig(); * method.Init(CountFeature); * result.Add(method); * } * } */ return(result); }