Beispiel #1
0
        /// <summary>
        /// Reports to log.
        /// </summary>
        /// <param name="report">The report.</param>
        /// <param name="logger">The logger.</param>
        public static void ReportToLog(this IClassificationReport report, ILogBuilder logger)
        {
            logger.AppendHeading(report.Name);
            logger.AppendPair("Classifier", report.Classifier);
            logger.AppendPair("F1-Measure", report.F1measure.ToString("F5"), true, "\t\t");

            logger.AppendPair("Precission", report.Precision.ToString("F5"), true, "\t\t");
            logger.AppendPair("Recall", report.Recall.ToString("F5"), true, "\t\t");

            logger.AppendPair("Total tests", report.Targets, true, "\t\t");
            logger.AppendPair("Correct", report.Correct, true, "\t\t");
        }
Beispiel #2
0
        /// <summary>
        /// Describes the unit via specified loger
        /// </summary>
        /// <param name="loger">The loger.</param>
        public void describe(ILogBuilder loger)
        {
            //            loger.log("deliveryUnit describe() call started");

            loger.AppendHeading("Delivery unit (" + GetType().Name + ")", 2);

            loger.AppendLine("Logical name: " + name);

            loger.open("items", "Delivery items", "List of all deliveryUnit items contained here");
            foreach (IDeliveryUnitItem item in items)
            {
                //loger.AppendHeading(this.name + " (" + this.GetType().Name + ")", 3);

                loger.AppendLine(" > " + item.name + ":" + item.itemType.ToString());
                loger.AppendLine(" > > Location: " + item.location.ToString());
                loger.AppendLine(" > > Description: " + item.description);
            }
            loger.close();

            loger.open("items", "Items by level", "Showing items triggered by scope level");
            reportElementLevel lev = reportElementLevel.none;

            foreach (KeyValuePair <reportElementLevel, List <deliveryUnitItem> > pair in itemByLevel)
            {
                lev = pair.Key;
                foreach (deliveryUnitItem it in pair.Value)
                {
                    loger.AppendLine(lev.ToString() + " --> " + it.name + " (" + it.GetType().Name + ")");
                }
            }
            loger.close();

            loger.open("items", "Output by level", "Showing items designated as output items and triggered by scope level");
            foreach (KeyValuePair <reportElementLevel, List <deliveryUnitItem> > pair in outputByLevel)
            {
                lev = pair.Key;
                foreach (deliveryUnitItem it in pair.Value)
                {
                    loger.AppendLine(lev.ToString() + " --> " + it.name + " (" + it.GetType().Name + ")");
                }
            }
            loger.close();

            //  loger.log("deliveryUnit describe() call finished");
        }