コード例 #1
0
        private void PrintClassifierInfoScores()
        {
            WekaUtils.Instance.WriteLog(System.Environment.NewLine);
            WekaUtils.Instance.WriteLog("Print detail data.");
            for (int k = 0; k < m_classifierInfoIdxs.GetLength(0); ++k)
            {
                for (int h = 0; h < m_classifierInfoIdxs.GetLength(3); ++h)
                {
                    WekaUtils.Instance.WriteLog(string.Format("DealType = {0}, Hour = {1}", Parameters.AllDealTypes[k], h));

                    for (int i = 0; i < m_classifierInfoIdxs.GetLength(1); ++i)
                    {
                        for (int j = 0; j < m_classifierInfoIdxs.GetLength(2); ++j)
                        {
                            WekaUtils.Instance.WriteLog(WekaUtils.GetCommaString(m_totalScores[k, i, j, h].ToString(Parameters.DoubleFormatString)), false);
                        }
                        WekaUtils.Instance.WriteLog(System.Environment.NewLine, false);
                    }

                    if (!TestParameters.EnablePerhourTrain)
                    {
                        break;
                    }
                }
            }

            if (TestParameters.EnablePerhourTrain)
            {
                WekaUtils.Instance.WriteLog("Print data accord hour.");
                double[, ,] d = new double[m_classifierInfoIdxs.GetLength(0), m_classifierInfoIdxs.GetLength(1), m_classifierInfoIdxs.GetLength(2)];
                IterateClassifierInfos((k, i, j, h) =>
                {
                    d[k, i, j] += m_totalScores[k, i, j, h];
                });
                for (int k = 0; k < m_classifierInfoIdxs.GetLength(0); ++k)
                {
                    WekaUtils.Instance.WriteLog(string.Format("DealType = {0}", Parameters.AllDealTypes[k]));

                    for (int i = 0; i < m_classifierInfoIdxs.GetLength(1); ++i)
                    {
                        for (int j = 0; j < m_classifierInfoIdxs.GetLength(2); ++j)
                        {
                            WekaUtils.Instance.WriteLog(WekaUtils.GetCommaString(d[k, i, j].ToString(Parameters.DoubleFormatString)), false);
                        }
                        WekaUtils.Instance.WriteLog(System.Environment.NewLine, false);
                    }
                }
            }


            {
                WekaUtils.Instance.WriteLog("Print data accord tp.");
                double[, ,] d = new double[m_classifierInfoIdxs.GetLength(0), m_classifierInfoIdxs.GetLength(2), m_classifierInfoIdxs.GetLength(3)];
                IterateClassifierInfos((k, i, j, h) =>
                {
                    d[k, j, h] += m_totalScores[k, i, j, h];
                });
                for (int k = 0; k < m_classifierInfoIdxs.GetLength(0); ++k)
                {
                    WekaUtils.Instance.WriteLog(string.Format("DealType = {0}", Parameters.AllDealTypes[k]));

                    for (int h = 0; h < m_classifierInfoIdxs.GetLength(3); ++h)
                    {
                        for (int j = 0; j < m_classifierInfoIdxs.GetLength(2); ++j)
                        {
                            WekaUtils.Instance.WriteLog(WekaUtils.GetCommaString(d[k, j, h].ToString(Parameters.DoubleFormatString)), false);
                        }
                        WekaUtils.Instance.WriteLog(System.Environment.NewLine, false);
                        if (!TestParameters.EnablePerhourTrain)
                        {
                            break;
                        }
                    }
                }
            }

            {
                WekaUtils.Instance.WriteLog("Print data accord sl.");
                double[, ,] d = new double[m_classifierInfoIdxs.GetLength(0), m_classifierInfoIdxs.GetLength(1), m_classifierInfoIdxs.GetLength(3)];
                IterateClassifierInfos((k, i, j, h) =>
                {
                    d[k, i, h] += m_totalScores[k, i, j, h];
                });
                for (int k = 0; k < m_classifierInfoIdxs.GetLength(0); ++k)
                {
                    WekaUtils.Instance.WriteLog(string.Format("DealType = {0}", Parameters.AllDealTypes[k]));

                    for (int h = 0; h < m_classifierInfoIdxs.GetLength(3); ++h)
                    {
                        for (int i = 0; i < m_classifierInfoIdxs.GetLength(1); ++i)
                        {
                            WekaUtils.Instance.WriteLog(WekaUtils.GetCommaString(d[k, i, h].ToString(Parameters.DoubleFormatString)), false);
                        }
                        WekaUtils.Instance.WriteLog(System.Environment.NewLine, false);
                        if (!TestParameters.EnablePerhourTrain)
                        {
                            break;
                        }
                    }
                }
            }
        }