示例#1
0
        public BaseFrontEnd(FuzzySystemRelisedList.TypeSystem TypeFS)
        {
            typeFuzzySystem = TypeFS;
            AllMethods      = new BaseMethodLoad(TypeFS);

            switch (typeFuzzySystem)
            {
            case FuzzySystemRelisedList.TypeSystem.PittsburghClassifier:
            {
                /*    loadLearnUFS = loadPCLearnFromUFS;
                 *  loadLearnKEEL = loadPCLearnFromKeel;
                 *  loadTestKEEL = loadPCTestFromKeel;
                 *  loadTestUFS = loadPCTestFromUFS;
                 */createFSSamplesSet   = createPCFSFromSampleSet;
                loadFSUFS            = loadPCFSFromUFS;
                writeIFuzzySystemUFS = writePCtoUFS;
                showErrorInfo        = ErrorInfoPC;
                break;
            }

            case FuzzySystemRelisedList.TypeSystem.Singletone:
            {
                /*     loadLearnUFS = loadSALearnFromUFS;
                 *   loadLearnKEEL = loadSALearnFromKeel;
                 *   loadTestKEEL = loadSATestFromKeel;
                 *   loadTestUFS = loadSATestFromUFS;
                 */createFSSamplesSet   = createSAFSFromSampleSet;
                loadFSUFS            = loadSAFSFromUFS;
                writeIFuzzySystemUFS = writeSAtoUFS;
                showErrorInfo        = ErrorInfoSA;
                break;
            }

            case FuzzySystemRelisedList.TypeSystem.TakagiSugenoApproximate:
            {
                /*    loadLearnUFS = loadSALearnFromUFS;
                 *  loadLearnKEEL = loadSALearnFromKeel;
                 *  loadTestKEEL = loadSATestFromKeel;
                 *  loadTestUFS = loadSATestFromUFS;
                 */createFSSamplesSet   = createTSAFSFromSampleSet;
                loadFSUFS            = loadTSAFSFromUFS;
                writeIFuzzySystemUFS = writeTSAtoUFS;
                showErrorInfo        = ErrorInfoTSA;
                break;
            }

            default:
            {
                // loadLearnUFS = loadSALearnFromUFS;
                break;
            }
            }
        }
示例#2
0
        public BaseMethodLoad(FuzzySystemRelisedList.TypeSystem TypeFS)
        {
            TypeFuzzySystem = TypeFS;
            string[] fileinit = Directory.GetFiles(MethodOfInitPath, "*.dll");
            string[] fileTune = Directory.GetFiles(MethodsOfTunePath, "*.dll");
            Parallel.ForEach(fileinit, tryLoadMethod);
            Parallel.ForEach(fileTune, tryLoadMethod);
            CompararerForMethods forSort = new CompararerForMethods();

            instanceOfInit.Distinct();
            instanceOfInit.Sort(forSort);

            instanceOfTune.Distinct();
            instanceOfTune.Sort(forSort);
            GC.Collect();
        }
示例#3
0
        public Result_F(FuzzySystemRelisedList.TypeSystem tFS, bool IsMultiChoose, int CountMultiChoosen)
        {
            InitializeComponent();
            TypeFS            = tFS;
            isMultiChoose     = IsMultiChoose;
            countMultiChoosen = CountMultiChoosen;

            ApproxLearnResult        = new List <double>();
            ApproxTestResult         = new List <double>();
            ApproxLearnResultMSE     = new List <double>();
            ApproxTestResultMSE      = new List <double>();
            ApproxLearnResultMSEdiv2 = new List <double>();
            ApproxTestResultMSEdiv2  = new List <double>();
            ClassLearnResult         = new List <double>();
            ClassTestResult          = new List <double>();
            ClassErLearn             = new List <double>();
            ClassErTest = new List <double>();
        }
示例#4
0
        public static IFuzzySystem LoadUFS(string FileName, out FuzzySystemRelisedList.TypeSystem TypeFS)
        {
            IFuzzySystem result = null;

            TypeFS = FuzzySystemRelisedList.TypeSystem.PittsburghClassifier;
            XmlDocument Source = new XmlDocument();

            Source.Load(FileName);
            XmlNode temp       = Source.SelectSingleNode("FuzzySystem");
            string  typestring = temp.Attributes.GetNamedItem("Type").Value.ToLowerInvariant();

            switch (typestring)
            {
            case "approximatortakagisugeno":
            {
                TSAFuzzySystem TSAFS = new TSAFuzzySystem(LoadLearnFromUFS(Source), LoadTestFromUFS(Source));
                TSAFS.loadUFS(Source);
                result = TSAFS;
                TypeFS = FuzzySystemRelisedList.TypeSystem.TakagiSugenoApproximate;
                break;
            }

            case "approximatorsingleton":
            {
                SAFuzzySystem SAFS = new SAFuzzySystem(LoadLearnFromUFS(Source), LoadTestFromUFS(Source));
                SAFS.loadUFS(Source);
                result = SAFS;
                TypeFS = FuzzySystemRelisedList.TypeSystem.Singletone;
                break;
            }

            case "classifierpittsburgh":
            {
                PCFuzzySystem PCFS = new PCFuzzySystem(LoadLearnFromUFS(Source), LoadTestFromUFS(Source));
                PCFS.loadUFS(Source);
                result = PCFS;
                TypeFS = FuzzySystemRelisedList.TypeSystem.PittsburghClassifier;
                break;
            }
            }

            return(result);
        }