Esempio n. 1
0
        public void ShowROC(int number)
        {
            ROCEvaluationResult roc = rocs[number];

            string tempfile = Path.GetTempFileName();

            using (TextWriter w = new StreamWriter(tempfile))
            {
                w.WriteLine("l");
                w.WriteLine("{0} {1}", 0, 0);
                w.WriteLine("{0} {1}", 1, 1);
                w.WriteLine("l ROC");
                for (int i = 0; i < roc.Count; i++)
                {
                    w.WriteLine("{0} {1}", roc.Pf[i], roc.Se[i]);
                }
                w.WriteLine("l Precision");
                for (int i = 0; i < roc.Count; i++)
                {
                    w.WriteLine("{0} {1}", (double)i * 0.01, roc.P[i]);
                }
                w.WriteLine("l Sensitivity (Recall)");
                for (int i = 0; i < roc.Count; i++)
                {
                    w.WriteLine("{0} {1}", (double)i * 0.01, roc.Se[i]);
                }
                w.WriteLine("l Specificity");
                for (int i = 0; i < roc.Count; i++)
                {
                    w.WriteLine("{0} {1}", (double)i * 0.01, roc.Sp[i]);
                }
            }
            Shell.Run("MSR.Tools.Visualizer.exe", tempfile);
        }
Esempio n. 2
0
 private string RocEvaluationResultToString(ROCEvaluationResult roer)
 {
     return(RocEvaluationResultToString(roer.AUC, roer.MaxPoint, roer.BalancePoint, roer.OptimalPoint));
 }