3#include "../_cexports/c_polimago.h"
5#include "../global.hpp"
6#include "../string.hpp"
7#include "predictor_base.hpp"
30 exampleMeanSquareErrors_()
32 CVB_CALL_CAPI(PMGetTestResultTrainParams(
Handle(), trainingParameters_));
35 for (
decltype(num_examples) i = 0; i < num_examples; ++i)
37 exampleMeanSquareErrors_.push_back (CVB_CALL_CAPI (PMGetTestResultExampleMeanSquareError(
Handle(), i)));
48 static CExports::TTESTRESULT LoadInternal (
const String & fileName)
50 CExports::TTESTRESULT testResult =
nullptr;
52 CVB_CALL_CAPI_CHECKED (PMOpenTestResultTyped(fileName.c_str(), testResult));
56 void SaveFunction (
const String &fileName)
const override
58 CVB_CALL_CAPI_CHECKED (PMSaveTestResultTyped(fileName.c_str(),
Handle()));
69 return static_cast<int>(CVB_CALL_CAPI (PMGetTestResultNumExamples(
Handle())));
79 return static_cast<int>(CVB_CALL_CAPI (PMGetTestResultTotalMeanSquareError(
Handle())));
89 return exampleMeanSquareErrors_;
99 return trainingParameters_.FeatureMap.FeatureResolution;
Base class for Polimago objects created by one of the factory classes.
Definition: predictor_base.hpp:44
void * Handle() const noexcept
Classic API Polimago handle.
Definition: predictor_base.hpp:66
Base class for all Polimago Test Results.
Definition: test_result_base.hpp:26
int FeatureResolution() const noexcept
Feature resolution value with which the classifier was trained.
Definition: test_result_base.hpp:97
std::vector< double > ExampleMeanSquareError() const
Mean square error for each individual example (the index runs over all the examples that contributed ...
Definition: test_result_base.hpp:87
int NumExamples() const
Number of examples that contributed to this test result.
Definition: test_result_base.hpp:67
double TotalMeanSquareError() const
Total mean square error of the predictor over all examples and all coordinates.
Definition: test_result_base.hpp:77
Root namespace for the Image Manager interface.
Definition: c_barcode.h:24