summaryrefslogtreecommitdiffstats
path: root/ml/dlib/tools/python/src/testing_results.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-03-09 13:19:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-03-09 13:20:02 +0000
commit58daab21cd043e1dc37024a7f99b396788372918 (patch)
tree96771e43bb69f7c1c2b0b4f7374cb74d7866d0cb /ml/dlib/tools/python/src/testing_results.h
parentReleasing debian version 1.43.2-1. (diff)
downloadnetdata-58daab21cd043e1dc37024a7f99b396788372918.tar.xz
netdata-58daab21cd043e1dc37024a7f99b396788372918.zip
Merging upstream version 1.44.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ml/dlib/tools/python/src/testing_results.h')
-rw-r--r--ml/dlib/tools/python/src/testing_results.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/ml/dlib/tools/python/src/testing_results.h b/ml/dlib/tools/python/src/testing_results.h
new file mode 100644
index 000000000..746e2934a
--- /dev/null
+++ b/ml/dlib/tools/python/src/testing_results.h
@@ -0,0 +1,50 @@
+// Copyright (C) 2013 Davis E. King (davis@dlib.net)
+// License: Boost Software License See LICENSE.txt for the full license.
+#ifndef DLIB_TESTING_ReSULTS_H__
+#define DLIB_TESTING_ReSULTS_H__
+
+#include <dlib/matrix.h>
+
+struct binary_test
+{
+ binary_test() : class1_accuracy(0), class2_accuracy(0) {}
+ binary_test(
+ const dlib::matrix<double,1,2>& m
+ ) : class1_accuracy(m(0)),
+ class2_accuracy(m(1)) {}
+
+ double class1_accuracy;
+ double class2_accuracy;
+};
+
+struct regression_test
+{
+ regression_test() = default;
+ regression_test(
+ const dlib::matrix<double,1,4>& m
+ ) : mean_squared_error(m(0)),
+ R_squared(m(1)),
+ mean_average_error(m(2)),
+ mean_error_stddev(m(3))
+ {}
+
+ double mean_squared_error = 0;
+ double R_squared = 0;
+ double mean_average_error = 0;
+ double mean_error_stddev = 0;
+};
+
+struct ranking_test
+{
+ ranking_test() : ranking_accuracy(0), mean_ap(0) {}
+ ranking_test(
+ const dlib::matrix<double,1,2>& m
+ ) : ranking_accuracy(m(0)),
+ mean_ap(m(1)) {}
+
+ double ranking_accuracy;
+ double mean_ap;
+};
+
+#endif // DLIB_TESTING_ReSULTS_H__
+