    

 ## On this page

  

 

 # CoP Struct Reference

 Last update: 16.07.2025 

Reference implementation for a quality metric for [MOP](class_m_o_p.xhtml "a group of random fields belonging together (either a single random field, or multiple cross-correlat...") models. [More...](struct_co_p.xhtml#details)

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

<a id="adca3e46224da11f75247ecb839723c86"></a> [CoP](struct_co_p.xhtml#adca3e46224da11f75247ecb839723c86) ()=default Constructor.   
 <a id="a4702894ea742a06b44535da67267b407"></a> [CoP](struct_co_p.xhtml#a4702894ea742a06b44535da67267b407) ([CoP](struct_co_p.xhtml))=default Copy-Constructor.   
 virtual number [error](struct_co_p.xhtml#a4a4f4dfb26f77b55280f37a0610dd5f9) ([ResidualsBase](struct_residuals_base.xhtml) residuals, uint64\_t output=0) override Computes the prediction error of the given residuals according to the input and its selected output. [More...](#a4a4f4dfb26f77b55280f37a0610dd5f9)  
 <a id="ad9917a97363feb7eeee81a1b47fc41fa"></a>virtual bool [expectsCrossValidation](struct_co_p.xhtml#ad9917a97363feb7eeee81a1b47fc41fa) () override Return true if the quality measure expects to handle cross validated outputs.   
 virtual [loadJson](struct_co_p.xhtml#ae5700ae63985e3e6b30cb716ddb5fdd0) ([JsonValue](class_json_value.xhtml) root) override Function to load the Serializables data from a [JsonValue](class_json_value.xhtml "Simple wrapper class to jsoncpp that make working with SWIG more convenient. "). [More...](#ae5700ae63985e3e6b30cb716ddb5fdd0)  
 virtual number [measure](struct_co_p.xhtml#a4b157842a805ad774da2ab43e530e3d4) ([ResidualsBase](struct_residuals_base.xhtml) residuals, uint64\_t output=0) override Computes the quality measure of the given residuals according to the input and its selected output. [More...](#a4b157842a805ad774da2ab43e530e3d4)  
 <a id="a052c74a9131f44b75aca6bcd6f18828c"></a>[CoP](struct_co_p.xhtml) [operator=](struct_co_p.xhtml#a052c74a9131f44b75aca6bcd6f18828c) ([CoP](struct_co_p.xhtml))=default Copy-Assignment.   
 virtual [JsonValue](class_json_value.xhtml) [saveJson](struct_co_p.xhtml#ab4587af0230811304c91f1c0aaa1c9ce) () override Function to save the Serializables data as a [JsonValue](class_json_value.xhtml "Simple wrapper class to jsoncpp that make working with SWIG more convenient. "). [More...](#ab4587af0230811304c91f1c0aaa1c9ce)  
 <a id="a77047bf810e52c1c56fa06464a9ecc3f"></a>virtual std::ostream [write](struct_co_p.xhtml#a77047bf810e52c1c56fa06464a9ecc3f) (std::ostream) override Write the qualityMeasures name out.   
 <a id="details" name="details"></a>## Detailed Description

Reference implementation for a quality metric for [MOP](class_m_o_p.xhtml "a group of random fields belonging together (either a single random field, or multiple cross-correlat...") models.



## Member Function Documentation

<a id="a4a4f4dfb26f77b55280f37a0610dd5f9"></a>## [◆ ](#a4a4f4dfb26f77b55280f37a0610dd5f9)error()

 virtual number error  ( [ResidualsBase](struct_residuals_base.xhtml)  *residuals*,    uint64\_t  *output* = `0`   )   overridevirtual 

Computes the prediction error of the given residuals according to the input and its selected output.

Parameters residualsThe residuals to calculate the quality measure for outputthe selected output. ReturnsA value that measures the deviation of the residualss approximation against the selected output. Implements [QualityMeasureBase](struct_quality_measure_base.xhtml#ac8a977438da39c4eb58c837aecf65ab4).





<a id="ae5700ae63985e3e6b30cb716ddb5fdd0"></a>## [◆ ](#ae5700ae63985e3e6b30cb716ddb5fdd0)loadJson()

 virtual loadJson  ( [JsonValue](class_json_value.xhtml)  *root*)   overridevirtual 

Function to load the Serializables data from a [JsonValue](class_json_value.xhtml "Simple wrapper class to jsoncpp that make working with SWIG more convenient. ").

Parameters rootThe data of the serializable as [JsonValue](class_json_value.xhtml "Simple wrapper class to jsoncpp that make working with SWIG more convenient. ") 



<a id="a4b157842a805ad774da2ab43e530e3d4"></a>## [◆ ](#a4b157842a805ad774da2ab43e530e3d4)measure()

 virtual number measure  ( [ResidualsBase](struct_residuals_base.xhtml)  *residuals*,    uint64\_t  *output* = `0`   )   overridevirtual 

Computes the quality measure of the given residuals according to the input and its selected output.

Parameters residualsThe residuals to calculate the quality measure for outputthe selected output. ReturnsA value that measures the deviation of the residualss approximation against the selected output. Implements [QualityMeasureBase](struct_quality_measure_base.xhtml#a8d0dfd88a4f82ebefd1210abe81a82d0).





<a id="ab4587af0230811304c91f1c0aaa1c9ce"></a>## [◆ ](#ab4587af0230811304c91f1c0aaa1c9ce)saveJson()

 virtual [JsonValue](class_json_value.xhtml) saveJson  ( )   overridevirtual 

Function to save the Serializables data as a [JsonValue](class_json_value.xhtml "Simple wrapper class to jsoncpp that make working with SWIG more convenient. ").

ReturnsThe data of the serializable as [JsonValue](class_json_value.xhtml "Simple wrapper class to jsoncpp that make working with SWIG more convenient. ")