예제 #1
0
        public override void writeToFile(TextWriter handle, string path)
        {
            Utils.Table overall = new Utils.Table(new string[] { "Pipeline", "Classification Quality", "Grouping Quality", "Recognition Quality" });
            handle.WriteLine("Overall results");
            int pipelineID = 0;

            foreach (RecognitionPipeline pipeline in _pipelines)
            {
                pipelineID++;
                overall.addResult(new string[] {
                    "" + pipelineID,
                    "" + _cls[pipeline] / _numTests,
                    "" + _grp[pipeline] / _numTests,
                    "" + _rec[pipeline] / _numTests
                });
            }
            overall.writeCSV(handle);
            handle.WriteLine();

            pipelineID = 0;
            foreach (RecognitionPipeline pipeline in _pipelines)
            {
                pipelineID++;
                handle.WriteLine("Pipeline " + pipelineID);
                _classificationConfusion[pipeline].writeCSV(handle);
                _recognitionConfusion[pipeline].writeCSV(handle);
                _tables[pipeline].writeCSV(handle);
                handle.WriteLine();
            }
        }
예제 #2
0
        public override void finalize(TextWriter handle, string path)
        {
            Utils.Table overall = new Utils.Table(new string[] {
                "Pipeline",
                "Classification Quality",
                "Grouping Quality",
                "Recognition Quality",
                "Real Recognition Quality",
                "Per-substroke Recognition Quality"
            });
            handle.WriteLine("Overall results");
            foreach (RecognitionPipeline pipeline in _pipelines)
            {
                overall.addResult(new string[] {
                    "" + pipelineId(pipeline),
                    "" + _cls[pipeline] / _numTests,
                    "" + _grp[pipeline] / _numTests,
                    "" + _rec[pipeline] / _numTests,
                    "" + _realRec[pipeline] / _numTests,
                    "" + _srec[pipeline] / _numTests
                });
            }
            overall.writeCSV(handle);
            handle.WriteLine();

            foreach (RecognitionPipeline pipeline in _pipelines)
            {
                handle.WriteLine("Pipeline " + pipelineId(pipeline));
                _classificationConfusion[pipeline].writeCSV(handle);
                _recognitionConfusion[pipeline].writeCSV(handle);
                _tables[pipeline].writeCSV(handle);
                handle.WriteLine();
            }
        }