示例#1
0
        public IFuzzySystem(IFuzzySystem Source)
        {
            learnSamplesSet  = Source.learnSamplesSet;
            acceptedFeatures = Source.acceptedFeatures.Clone() as bool [];

            testSamplesSet = Source.testSamplesSet;
        }
        IFuzzySystem IAbstractLearnAlgorithm.TuneUpFuzzySystem(IFuzzySystem FuzzySystem, ILearnAlgorithmConf conf)
        {
            if (FuzzySystem is PCFuzzySystem)
            {
                if (((PCFuzzySystem)FuzzySystem).RulesDatabaseSet.Count < 1)
                {
                    throw new ArgumentException("В нечеткой системе нет правил");
                }
                return(TuneUpFuzzySystem(FuzzySystem as PCFuzzySystem, conf));
            }

            if (FuzzySystem is TSAFuzzySystem)
            {
                if (((TSAFuzzySystem)FuzzySystem).RulesDatabaseSet.Count < 1)
                {
                    throw new ArgumentException("В нечеткой системе нет правил");
                }

                return(TuneUpFuzzySystem(FuzzySystem as TSAFuzzySystem, conf));
            }

            if (FuzzySystem is SAFuzzySystem)
            {
                if (((SAFuzzySystem)FuzzySystem).RulesDatabaseSet.Count < 1)
                {
                    throw new ArgumentException("В нечеткой системе нет правил");
                }

                return(TuneUpFuzzySystem(FuzzySystem as SAFuzzySystem, conf));
            }

            throw new  NotImplementedException("Нечеткая система неизвестного типа");
        }
示例#3
0
 /// <summary>
 /// Клонирующий конструктор. Создает полную копию исходной нечеткой счистемы.
 /// </summary>
 /// <param name="Source">Исходная нечеткая система</param>
 public IFuzzySystem(IFuzzySystem Source)
 {
     Requires(Source != null);
     //       sw = new System.Diagnostics.Stopwatch();
     LearnSamplesSet  = Source.LearnSamplesSet;
     AcceptedFeatures = Source.AcceptedFeatures.Clone() as bool[];
     TestSamplesSet   = Source.TestSamplesSet;
 }
        IFuzzySystem IAbstractGenerator.Generate(IFuzzySystem FuzzySystem, conf.IGeneratorConf config)
        {
            if (FuzzySystem is PittsburghClassifier.PCFuzzySystem)
            {
                return(Generate(FuzzySystem as PittsburghClassifier.PCFuzzySystem, config));
            }

            if (FuzzySystem is TakagiSugenoApproximate.TSAFuzzySystem)
            {
                return(Generate(FuzzySystem as TakagiSugenoApproximate.TSAFuzzySystem, config));
            }

            if (FuzzySystem is SingletoneApproximate.SAFuzzySystem)
            {
                return(Generate(FuzzySystem as SingletoneApproximate.SAFuzzySystem, config));
            }

            throw new NotImplementedException("Неизвестный вид нечеткой системы");
        }