//public void ExportTextReport<T>(StringBuilder sb) T where
        //{
        //    var l = GetAllContainers();

        //    l.Sort((x, y) => -x.totalFrequency.CompareTo(y.totalFrequency));

        //    StringBuilder sb = new StringBuilder();
        //    Int32 i = 1;
        //    foreach (TFDFContainer container in TFDF)
        //    {
        //        pipelineTaskTFDFContentSubject s = new pipelineTaskTFDFContentSubject(container);
        //        pipelineTask<pipelineTaskTFDFContentSubject> task = new pipelineTask<pipelineTaskTFDFContentSubject>(s);
        //        sb.AppendLine(String.Format("[" + i.ToString("D5") + "] {0,-40} : DF {1,-5} - TF {2,-5} ", s.tfdf.indexForm, s.tfdf.documentFrequency, s.tfdf.totalFrequency));
        //        i++;
        //        sTasks.Add(task);
        //    }
        //}

        /// <summary>
        /// Gets the table with containers.
        /// </summary>
        /// <returns></returns>
        public objectTable <TFDFContainer> GetTableWithContainers()
        {
            objectTable <TFDFContainer> output = new objectTable <TFDFContainer>(nameof(TFDFContainer.indexForm), nameof(TFDFContainer));

            foreach (TFDFContainer c in items.Values)
            {
                output.Add(c);
            }

            return(output);
        }
Beispiel #2
0
        public DataTable GetAverageTable(experimentExecutionContext context)
        {
            objectTable <DocumentSetCaseCollectionReport> tp = new objectTable <DocumentSetCaseCollectionReport>(nameof(DocumentSetCaseCollectionReport.Name), parent.validationCase.name + "_avg");

            foreach (var pair in avgReports)
            {
                tp.Add(pair.Value);
            }

            DataTable output   = tp.GetDataTable();
            String    foldName = parent.validationCase.name;

            parent.validationCase.context.AddExperimentInfo(output);
            output.SetDescription($"Aggregates of [{foldName}] evaluation - only averages");
            output.SetAdditionalInfoEntry("Report type", "Average per classifier");
            //output.AddExtra("Most relevant rows are annoted with [(mean)] word");


            return(output);
        }
Beispiel #3
0
        public DataTable GetFullValidationTable(experimentExecutionContext context)
        {
            objectTable <DocumentSetCaseCollectionReport> tp = new objectTable <DocumentSetCaseCollectionReport>(nameof(DocumentSetCaseCollectionReport.Name), parent.validationCase.name + "_avg");

            foreach (var pair in this)
            {
                foreach (var r in pair.Value)
                {
                    tp.Add(r);
                }
            }

            DataTable output   = tp.GetDataTable();
            String    foldName = parent.validationCase.name;

            parent.validationCase.context.AddExperimentInfo(output);
            output.SetDescription($"Results of fold [{foldName}] evaluation, with all entries");
            output.SetAdditionalInfoEntry("Report type", "All entries");
            output.AddExtra("Most relevant rows are annoted with [(mean)] word");


            return(output);
        }