CVB++ 14.0
RegressionTestResult Class Reference

Regression test result object. More...

#include <cvb/polimago/regression_test_result.hpp>

Inherits TestResultBase.

Public Member Functions

 RegressionTestResult (const String &fileName)
 Load a saved regression test result from a file. More...
 
 RegressionTestResult (RegressionTestResult &&) noexcept=default
 Move constructor.
 
RegressionTestResultoperator= (RegressionTestResult &&) noexcept=default
 Move assignment operator.
 
int RegressionDimension () const
 Dimension of the regression results. More...
 
std::vector< std::vector< double > > TargetValues () const
 Target values for each example. More...
 
std::vector< std::vector< double > > PredictedValues () const
 Prediction results for example. More...
 
- Public Member Functions inherited from TestResultBase
int NumExamples () const
 Number of examples that contributed to this test result. More...
 
double TotalMeanSquareError () const
 Total mean square error of the predictor over all examples and all coordinates. More...
 
std::vector< double > ExampleMeanSquareError () const
 Mean square error for each individual example (the index runs over all the examples that contributed to this test result). More...
 
int FeatureResolution () const noexcept
 Feature resolution value with which the classifier was trained. More...
 
- Public Member Functions inherited from PolimagoFactoryCreatedObject
void * Handle () const noexcept
 Classic API Polimago handle. More...
 
String FileName () const
 Name of the file the object has been loaded from (or empty string if the object was not loaded). More...
 
void Save (const String &fileName) const
 Save this object into a file. More...
 
double Lambda () const noexcept
 Regularization value that has been used for generating this object. More...
 
double Offset () const noexcept
 Intercept weight that has been used for generating this object. More...
 
InterpolationType Interpolation () const noexcept
 Interpolation setting used for generating this object. More...
 
int ImagePlanes () const noexcept
 The plane count of the images that have been used for generating this classifier. Image on which this classifier is to be used will need to have the same plane count. More...
 
Rect< int > FeatureWindowExtent () const noexcept
 The feature window extent that has been used during classifier training. More...
 
Size2D< int > RetinaSize () const noexcept
 Size of the 'Retina' in pixels. The retina is the set of paxels onto which the input image is projected using the preprocessing code prior to application/training of the classifier. More...
 
Point2D< double > Correction () const noexcept
 Correction factors in X and Y direction required to rescale the input images for projection onto the retina. More...
 
String Preprocessing () const
 Preprocessing code with which this object was generated. More...
 

Static Public Member Functions

static std::unique_ptr< RegressionTestResultFromHandle (ReleaseObjectGuard &&guard)
 Creates test result from a classic API handle. More...
 
static std::unique_ptr< RegressionTestResultLoad (const String &fileName)
 Load a saved test result from a file. More...
 

Detailed Description

Regression test result object.

Constructor & Destructor Documentation

◆ RegressionTestResult()

RegressionTestResult ( const String fileName)
inline

Load a saved regression test result from a file.

Parameters
[in]fileNameName of the file to be loaded.
Returns
Loaded test result.
Exceptions
Anyexception derived from std::exception including CvbException.

Member Function Documentation

◆ FromHandle()

static std::unique_ptr< RegressionTestResult > FromHandle ( ReleaseObjectGuard &&  guard)
inlinestatic

Creates test result from a classic API handle.

Parameters
[in]guardLife time guard for C-API handle.
Returns
The test result created from the classic API handle.
Exceptions
Anyexception derived from std::exception including CvbException.

The predictor takes ownership of the handle, so you must share it before using this function.

◆ Load()

static std::unique_ptr< RegressionTestResult > Load ( const String fileName)
inlinestatic

Load a saved test result from a file.

Parameters
[in]fileNameName of the file to be loaded.
Returns
Pointer to the loaded test result.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ PredictedValues()

std::vector< std::vector< double > > PredictedValues ( ) const
inline

Prediction results for example.

Returns
Predicted values.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ RegressionDimension()

int RegressionDimension ( ) const
inline

Dimension of the regression results.

Returns
The regression dimension.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ TargetValues()

std::vector< std::vector< double > > TargetValues ( ) const
inline

Target values for each example.

Returns
Target values.
Exceptions
Anyexception derived from std::exception including CvbException.