Exemplo n.º 1
0
        public override void Work()
        {
            GIBNormal      = fuzzy_system.getGIBNormal();
            GIBSumStraigth = fuzzy_system.getGIBSumStrait();
            GIBSumReverce  = fuzzy_system.getGIBSumReverse();

            GICNormal     = fuzzy_system.getGICNormal();
            GICSumReverce = fuzzy_system.getGICSumReverce();
            GICSumStraigh = fuzzy_system.getGICSumStraigth();

            GISNormal      = fuzzy_system.getGISNormal();
            GISSumReverce  = fuzzy_system.getGISSumReverce();
            GISSumStraigth = fuzzy_system.getGISSumStraigt();

            LindisNormal     = fuzzy_system.getLindisNormal();
            LindisSumStraigh = fuzzy_system.getLindisSumStraight();
            LindisSumReverce = fuzzy_system.getLindisSumReverse();

            NormalIndex       = fuzzy_system.getNormalIndex();
            SumReverseIndex   = fuzzy_system.getIndexSumReverse();
            SumsStraigthIndex = fuzzy_system.getIndexSumStraigt();
            PCFSUFSWriter.saveToUFS(fuzzy_system, Source);
        }
Exemplo n.º 2
0
 private static void writeAboutEstimates(XmlWriter writer, PCFuzzySystem Classifier)
 {
     writer.WriteStartElement("Estimates");
     if (Classifier.TestSamplesSet != null)
     {
         writer.WriteAttributeString("Count", XmlConvert.ToString(22));
         writer.WriteStartElement("Estimate");
         writer.WriteAttributeString("Table", Classifier.LearnSamplesSet.FileName);
         writer.WriteAttributeString("Type", "PrecisionPercent");
         writer.WriteAttributeString("Value", XmlConvert.ToString(Classifier.ClassifyLearnSamples(Classifier.RulesDatabaseSet[0])));
         writer.WriteEndElement();
         writer.WriteStartElement("Estimate");
         writer.WriteAttributeString("Table", Classifier.LearnSamplesSet.FileName);
         writer.WriteAttributeString("Type", "ErrorPercent");
         writer.WriteAttributeString("Value", XmlConvert.ToString(Classifier.ErrorLearnSamples(Classifier.RulesDatabaseSet[0])));
         writer.WriteEndElement();
         writer.WriteStartElement("Estimate");
         writer.WriteAttributeString("Table", Classifier.TestSamplesSet.FileName);
         writer.WriteAttributeString("Type", "PrecisionPercent");
         writer.WriteAttributeString("Value", XmlConvert.ToString(Classifier.ClassifyTestSamples(Classifier.RulesDatabaseSet[0])));
         writer.WriteEndElement();
         writer.WriteStartElement("Estimate");
         writer.WriteAttributeString("Table", Classifier.TestSamplesSet.FileName);
         writer.WriteAttributeString("Type", "ErrorPercent");
         writer.WriteAttributeString("Value", XmlConvert.ToString(Classifier.ErrorTestSamples(Classifier.RulesDatabaseSet[0])));
         writer.WriteEndElement();
     }
     else
     {
         writer.WriteAttributeString("Count", XmlConvert.ToString(20));
         writer.WriteStartElement("Estimate");
         writer.WriteAttributeString("Table", Classifier.LearnSamplesSet.FileName);
         writer.WriteAttributeString("Type", "PrecisionPercent");
         writer.WriteAttributeString("Value", XmlConvert.ToString(Classifier.ClassifyLearnSamples(Classifier.RulesDatabaseSet[0])));
         writer.WriteEndElement();
         writer.WriteStartElement("Estimate");
         writer.WriteAttributeString("Table", Classifier.LearnSamplesSet.FileName);
         writer.WriteAttributeString("Type", "ErrorPercent");
         writer.WriteAttributeString("Value", XmlConvert.ToString(Classifier.ErrorLearnSamples(Classifier.RulesDatabaseSet[0])));
         writer.WriteEndElement();
     }
     writer.WriteStartElement("Estimate");
     writer.WriteAttributeString("Type", "GIBNormal");
     writer.WriteAttributeString("Value", XmlConvert.ToString(Classifier.getGIBNormal()));
     writer.WriteEndElement();
     writer.WriteStartElement("Estimate");
     writer.WriteAttributeString("Type", "GIBSumStraigh");
     writer.WriteAttributeString("Value", XmlConvert.ToString(Classifier.getGIBSumStrait()));
     writer.WriteEndElement();
     writer.WriteStartElement("Estimate");
     writer.WriteAttributeString("Type", "GIBSumReverse");
     writer.WriteAttributeString("Value", XmlConvert.ToString(Classifier.getGIBSumReverse()));
     writer.WriteEndElement();
     writer.WriteStartElement("Estimate");
     writer.WriteAttributeString("Type", "GICNormal");
     writer.WriteAttributeString("Value", XmlConvert.ToString(Classifier.getGICNormal()));
     writer.WriteEndElement();
     writer.WriteStartElement("Estimate");
     writer.WriteAttributeString("Type", "GICSumStraigh");
     writer.WriteAttributeString("Value", XmlConvert.ToString(Classifier.getGICSumStraigth()));
     writer.WriteEndElement();
     writer.WriteStartElement("Estimate");
     writer.WriteAttributeString("Type", "GICSumReverse");
     writer.WriteAttributeString("Value", XmlConvert.ToString(Classifier.getGICSumReverce()));
     writer.WriteEndElement();
     writer.WriteStartElement("Estimate");
     writer.WriteAttributeString("Type", "GISNormal");
     writer.WriteAttributeString("Value", XmlConvert.ToString(Classifier.getGISNormal()));
     writer.WriteEndElement();
     writer.WriteStartElement("Estimate");
     writer.WriteAttributeString("Type", "GISSumStraigh");
     writer.WriteAttributeString("Value", XmlConvert.ToString(Classifier.getGISSumStraigt()));
     writer.WriteEndElement();
     writer.WriteStartElement("Estimate");
     writer.WriteAttributeString("Type", "GISSumReverce");
     writer.WriteAttributeString("Value", XmlConvert.ToString(Classifier.getGISSumReverce()));
     writer.WriteEndElement();
     writer.WriteStartElement("Estimate");
     writer.WriteAttributeString("Type", "LindisNormal");
     writer.WriteAttributeString("Value", XmlConvert.ToString(Classifier.getLindisNormal()));
     writer.WriteEndElement();
     writer.WriteStartElement("Estimate");
     writer.WriteAttributeString("Type", "LindisSumStraigh");
     writer.WriteAttributeString("Value", XmlConvert.ToString(Classifier.getLindisSumStraight()));
     writer.WriteEndElement();
     writer.WriteStartElement("Estimate");
     writer.WriteAttributeString("Type", "LindisSumReverse");
     writer.WriteAttributeString("Value", XmlConvert.ToString(Classifier.getLindisSumReverse()));
     writer.WriteEndElement();
     writer.WriteStartElement("Estimate");
     writer.WriteAttributeString("Type", "NormalIndex");
     writer.WriteAttributeString("Value", XmlConvert.ToString(Classifier.getNormalIndex()));
     writer.WriteEndElement();
     writer.WriteStartElement("Estimate");
     writer.WriteAttributeString("Type", "RealIndex");
     writer.WriteAttributeString("Value", XmlConvert.ToString(Classifier.getIndexReal()));
     writer.WriteEndElement();
     writer.WriteStartElement("Estimate");
     writer.WriteAttributeString("Type", "SumStraigthIndex");
     writer.WriteAttributeString("Value", XmlConvert.ToString(Classifier.getIndexSumStraigt()));
     writer.WriteEndElement();
     writer.WriteStartElement("Estimate");
     writer.WriteAttributeString("Type", "SumReverseIndex");
     writer.WriteAttributeString("Value", XmlConvert.ToString(Classifier.getIndexSumReverse()));
     writer.WriteEndElement();
     writer.WriteStartElement("Estimate");
     writer.WriteAttributeString("Type", "ComplexitIt");
     writer.WriteAttributeString("Value", XmlConvert.ToString(Classifier.getComplexit()));
     writer.WriteEndElement();
     writer.WriteStartElement("Estimate");
     writer.WriteAttributeString("Type", "CountRules");
     writer.WriteAttributeString("Value", XmlConvert.ToString(Classifier.getRulesCount()));
     writer.WriteEndElement();
     writer.WriteEndElement();
 }