Beispiel #1
0
        private static void write_about_Estimates(XmlWriter writer, a_Fuzzy_System Approximate)
        {
            writer.WriteStartElement("Estimates");
            if (Approximate.Test_Samples_set != null)
            {
                writer.WriteAttributeString("Count", XmlConvert.ToString(2));
                writer.WriteStartElement("Estimate");
                writer.WriteAttributeString("Table", Approximate.Learn_Samples_set.File_Name.Remove(Approximate.Learn_Samples_set.File_Name.Length - 4, 4));
                writer.WriteAttributeString("Type", "RMSE");
                writer.WriteAttributeString("Value", XmlConvert.ToString(Approximate.approx_Learn_Samples()));
                writer.WriteEndElement();



                writer.WriteStartElement("Estimate");
                writer.WriteAttributeString("Table", Approximate.Test_Samples_set.File_Name.Remove(Approximate.Learn_Samples_set.File_Name.Length - 4, 4));
                writer.WriteAttributeString("Type", "RMSE");
                writer.WriteAttributeString("Value", XmlConvert.ToString(Approximate.approx_Test_Samples()));
                writer.WriteEndElement();
            }
            else
            {
                writer.WriteAttributeString("Count", XmlConvert.ToString(1));
                writer.WriteStartElement("Estimate");
                writer.WriteAttributeString("Table", Approximate.Learn_Samples_set.File_Name.Remove(Approximate.Learn_Samples_set.File_Name.Length - 4, 4));
                writer.WriteAttributeString("Type", "RMSE");
                writer.WriteAttributeString("Value", XmlConvert.ToString(Approximate.approx_Learn_Samples()));
                writer.WriteEndElement();
            }


            writer.WriteEndElement();
        }
Beispiel #2
0
        private void make_Log(Log_line EventCall, a_Fuzzy_System FS = null, string name_Alg = "", DateTime TimerValue = new DateTime(), TimeSpan TimerSpan = new TimeSpan())
        {
            switch (EventCall)
            {
            case Log_line.Start:
            {
                LOG += "(" + TimerValue.ToString() + ")" + " Начало построения системы" + Environment.NewLine;
                break;
            }

            case Log_line.StartGenerate:
            {
                LOG += "(" + TimerValue.ToString() + ")" + " Начата генерация системы" + Environment.NewLine;

                break;
            }

            case Log_line.StartOptimaze:
            {
                LOG += "(" + DateTime.Now.ToString() + ")" + " Начата оптимизация системы" + Environment.NewLine;
                break;
            }


            case Log_line.PreGenerate_log:
            {
                LOG += "(" + DateTime.Now.ToString() + ")" + " Генерация алгоритмом " + name_Alg.ToString() + Environment.NewLine;
                break;
            }

            case Log_line.PostGenerate_log:
            {
                LOG += "(" + DateTime.Now.ToString() + ")" + " Сгенерирована система сложностью " + FS.value_complexity().ToString() + Environment.NewLine +
                       "Точностью на обучающей выборке " + FS.approx_Learn_Samples().ToString() + ", Точность на тестовой выборке " + FS.approx_Test_Samples().ToString() + Environment.NewLine;
                LOG += "Использован " + name_Alg.ToString() + Environment.NewLine;
                break;
            }

            case Log_line.PreOptimaze_log:
            {
                LOG += "(" + DateTime.Now.ToString() + ")" + " Оптимизация алгоритмом " + name_Alg.ToString() + Environment.NewLine;

                break;
            }

            case Log_line.PostOptimaze_log:
            {
                LOG += "(" + DateTime.Now.ToString() + ")" + " оптимизированная система сложностью " + FS.value_complexity().ToString() + Environment.NewLine +
                       "Точностью на обучающей выборке " + Approx_Singletone.approx_Learn_Samples().ToString() + ", Точность на тестовой выборке " + FS.approx_Test_Samples().ToString() + Environment.NewLine;
                LOG += "Использован " + name_Alg.ToString() + Environment.NewLine;

                break;
            }


            case Log_line.EndCircle:
            {
                LOG += "(" + DateTime.Now.ToString() + ")" + " Время построения системы" + TimerSpan.TotalSeconds.ToString() + Environment.NewLine; break;
            }

            case Log_line.End:
            {
                LOG += "(" + DateTime.Now.ToString() + ")" + " Время построения всех систем" + TimerSpan.TotalSeconds.ToString() + Environment.NewLine; break;
            }

            default: { LOG += "Не верный вызов" + Environment.NewLine; break; }
            }
        }