Beispiel #1
0
 private void SetStatusText(TargetMetrics metrics)
 {
     if (accuracyText != null && rmsPrecisionText != null && sdPrecisionText != null && sampleText != null && validSamplesText != null)
     {
         accuracyText.text     = metrics.AverageAccuracy.ToString();
         rmsPrecisionText.text = metrics.RmsPrecision.ToString();
         sdPrecisionText.text  = String.Format("x: {0}\ty: {1}\tz: {2}", metrics.SdPrecision.x, metrics.SdPrecision.y, metrics.SdPrecision.z);
         sampleText.text       = metrics.SampleCount.ToString();
         validSamplesText.text = ((float)metrics.ValidSamples / metrics.SampleCount).ToString();
     }
 }
Beispiel #2
0
        public static bool MetricsToCsv(string FolderName, string FileName, List <TargetMetrics> MetricsDataList)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append(TargetMetrics.ToCSVHeader()).Append("\n");
            foreach (TargetMetrics _targetMetrics in MetricsDataList)
            {
                sb.Append(_targetMetrics.ToCSVString()).Append("\n");
            }

            string       _fileName = Path.Combine(FolderName, (FileName + "_experiment_data_metrics.csv"));
            StreamWriter writer    = new StreamWriter(_fileName);

            writer.Write(sb.ToString());
            writer.Close();
            return(true);
        }
Beispiel #3
0
 private void OnMetricsCalculated(TargetMetrics metrics)
 {
     SetStatusText(metrics);
 }