    

 ## On this page

  

 

 # Residuals Class Reference

 Last update: 16.07.2025 

The estimator class creates an abstraction for classes the QualityMeasure may be evaluated for in the [MOP](class_m_o_p.xhtml "a group of random fields belonging together (either a single random field, or multiple cross-correlat...") framework. It abstracts the essential data necessary in an quality measurement which can be done based on Three information: Approximation: This is data estimated using any approximation type CrossValidation: This is data that is estimated explicitly using cross-validation sets generated by the [MOP](class_m_o_p.xhtml "a group of random fields belonging together (either a single random field, or multiple cross-correlat...") handler AdjustmentCoefficient: This is a value in the range 1,...,N where N is the number of samples provided to the Estimator. [More...](class_residuals.xhtml#details)

## <a name="pub-methods"></a>Public Member Functions

virtual string [\_\_getstate\_\_](class_residuals.xhtml#a9350cb76131731f942f48489020fa0b2) () Serialization helpers for Python. This function allows the serialization of the REsiduals from inside Python. It can be used to serialize the residuals to store with custom model implementation. [More...](#a9350cb76131731f942f48489020fa0b2)  
 virtual [\_\_setstate\_internal](class_residuals.xhtml#a63341b304935e7b46f1e215161f07671) (string state) De-serialization helper fro python. This function gets called from a python function defined in the SWIG-Layer that provides de-serialization capabilities for the state encoded as a string. It finalizes setting an instances state from the given string. [More...](#a63341b304935e7b46f1e215161f07671)  
 <a id="a8dd7f15655b57d7cc35407bc11334bb2"></a>virtual uint64\_t [adjustmentCoefficient](class_residuals.xhtml#a8dd7f15655b57d7cc35407bc11334bb2) () override A function returning the AdjustmentCoefficient when called.   
 <a id="a72fbb0caf78eef1bce91de6e9b1249a7"></a>virtual uint64\_t [adjustmentCoefficientRef](class_residuals.xhtml#a72fbb0caf78eef1bce91de6e9b1249a7) () override A function returning the AdjustmentCoefficient when called.   
 virtual [Matrix](class_matrix.xhtml) [approximationValues](class_residuals.xhtml#a628146b05607ddc049415f176de09828) () override Destructor. [More...](#a628146b05607ddc049415f176de09828)  
 <a id="a4715cc9b7cdd549625596777ecf92856"></a>virtual [Matrix](class_matrix.xhtml) [approximationValuesRef](class_residuals.xhtml#a4715cc9b7cdd549625596777ecf92856) () override A function returning the Approximation data when called.   
 <a id="a19a8dd18ea4cba56a3546a9d7db7be47"></a>virtual [Matrix](class_matrix.xhtml) [crossValidationValues](class_residuals.xhtml#a19a8dd18ea4cba56a3546a9d7db7be47) () override A function return the CrossValidation data when called.   
 <a id="adb0fcf21491d18d53b6d9b6db7446ea2"></a>virtual [Matrix](class_matrix.xhtml) [crossValidationValuesRef](class_residuals.xhtml#adb0fcf21491d18d53b6d9b6db7446ea2) () override A function return the CrossValidation data when called.   
 <a id="a63221de26f2540b1609bbde9e0c165b9"></a>[Residuals](class_residuals.xhtml) [operator=](class_residuals.xhtml#a63221de26f2540b1609bbde9e0c165b9) ([Residuals](class_residuals.xhtml) other) Copy-Assignment.   
 <a id="a12d59f25cbe442106a8d89c13fc96852"></a>virtual [Matrix](class_matrix.xhtml) [originalValues](class_residuals.xhtml#a12d59f25cbe442106a8d89c13fc96852) () A function return the original data when called.   
 <a id="a75d50538e802e65a662fa2bf3923ba4d"></a>virtual [Matrix](class_matrix.xhtml) [originalValuesRef](class_residuals.xhtml#a75d50538e802e65a662fa2bf3923ba4d) () A function return the original data when called.   
 <a id="a03801914800cc202cd858c6702493859"></a> [Residuals](class_residuals.xhtml#a03801914800cc202cd858c6702493859) () Constructor.   
  [Residuals](class_residuals.xhtml#a6f2b1c38c3523414fe721c5a0f44d0b2) ([Matrix](class_matrix.xhtml) approx\_values, [Matrix](class_matrix.xhtml) cv\_values, [Matrix](class_matrix.xhtml) original\_values, uint64\_t adj\_coeff) Constructor that initializes the [Residuals](class_residuals.xhtml "The estimator class creates an abstraction for classes the QualityMeasure may be evaluated for in the...") with its data. [More...](#a6f2b1c38c3523414fe721c5a0f44d0b2)  
 <a id="a54041735a9cd5871b43643a98e8612af"></a> [Residuals](class_residuals.xhtml#a54041735a9cd5871b43643a98e8612af) ([Residuals](class_residuals.xhtml) other) Copy-Constructor.   
 template&lt;class Archive &gt;  [serialize](class_residuals.xhtml#aaa3a4f99152c0c2dce6c8794c9b1ee49) ([Archive](class_archive.xhtml) ar, number) serializes this object, see boost::serialization [More...](#aaa3a4f99152c0c2dce6c8794c9b1ee49)  
 ## <a name="friends"></a>Friends

<a id="ac98d07dd8f7b70e16ccb9a01abf56b9c"></a>class **boost::serialization::access** <a id="details" name="details"></a>## Detailed Description

The estimator class creates an abstraction for classes the QualityMeasure may be evaluated for in the [MOP](class_m_o_p.xhtml "a group of random fields belonging together (either a single random field, or multiple cross-correlat...") framework. It abstracts the essential data necessary in an quality measurement which can be done based on Three information: Approximation: This is data estimated using any approximation type CrossValidation: This is data that is estimated explicitly using cross-validation sets generated by the [MOP](class_m_o_p.xhtml "a group of random fields belonging together (either a single random field, or multiple cross-correlat...") handler AdjustmentCoefficient: This is a value in the range 1,...,N where N is the number of samples provided to the Estimator.



## Constructor &amp; Destructor Documentation

<a id="a6f2b1c38c3523414fe721c5a0f44d0b2"></a>## [◆ ](#a6f2b1c38c3523414fe721c5a0f44d0b2)Residuals()

 [Residuals](class_residuals.xhtml)  ( [Matrix](class_matrix.xhtml)  *approx\_values*,    [Matrix](class_matrix.xhtml)  *cv\_values*,    [Matrix](class_matrix.xhtml)  *original\_values*,    uint64\_t  *adj\_coeff*   ) 

Constructor that initializes the [Residuals](class_residuals.xhtml "The estimator class creates an abstraction for classes the QualityMeasure may be evaluated for in the...") with its data.

Parameters approx\_valuesThe approximation values for the given input points Can be identical to the cv\_values cv\_valuesThe cross-validation values on the input points. These are expected to be computed on base of the MOPs selection of a segmentation of the input values. This selection needs to be consistent for all models in a competition. original\_valuesThe values used originally dduring the training. adj\_coeffThe adjustment coefficient. 



## Member Function Documentation

<a id="a9350cb76131731f942f48489020fa0b2"></a>## [◆ ](#a9350cb76131731f942f48489020fa0b2)\_\_getstate\_\_()

 virtual string \_\_getstate\_\_  ( )   virtual 

Serialization helpers for Python. This function allows the serialization of the REsiduals from inside Python. It can be used to serialize the residuals to store with custom model implementation.

ReturnsThe [Residuals](class_residuals.xhtml "The estimator class creates an abstraction for classes the QualityMeasure may be evaluated for in the...") state as a string 



<a id="a63341b304935e7b46f1e215161f07671"></a>## [◆ ](#a63341b304935e7b46f1e215161f07671)\_\_setstate\_internal()

 virtual \_\_setstate\_internal  ( string  *state*)   virtual 

De-serialization helper fro python. This function gets called from a python function defined in the SWIG-Layer that provides de-serialization capabilities for the state encoded as a string. It finalizes setting an instances state from the given string.

Parameters stateThe residuals state encoded as string 



<a id="a628146b05607ddc049415f176de09828"></a>## [◆ ](#a628146b05607ddc049415f176de09828)approximationValues()

 virtual [Matrix](class_matrix.xhtml) approximationValues  ( )   overridevirtual 

Destructor.

A function returning the Approximation data when called

Implements [ResidualsBase](struct_residuals_base.xhtml#ae88060171492f9cde2caa03a1d7d8673).





<a id="aaa3a4f99152c0c2dce6c8794c9b1ee49"></a>## [◆ ](#aaa3a4f99152c0c2dce6c8794c9b1ee49)serialize()

 serialize  ( [Archive](class_archive.xhtml)  *ar*,    number     ) 

serializes this object, see boost::serialization

Parameters arthe boost archive versionthe version number