    

 ## On this page

  

 

 # ComputeCoefficientOfDetermination&lt; TYPE &gt; Class Template Reference

 Last update: 16.07.2025 

a struct which collects settings for computing the Coefficient Of Determination [More...](class_compute_coefficient_of_determination.xhtml#details)

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

 [check](class_compute_coefficient_of_determination.xhtml#a47c34ec1e578c2ce27cf1c5fcd0d1704) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b)) checks the settings on plausibility It throws an exception if there is a problem with the settings. Important: It tries to find out all problems with these settings and then exits the routine. [More...](#a47c34ec1e578c2ce27cf1c5fcd0d1704)  
  [compute](class_compute_coefficient_of_determination.xhtml#ab08e112d95fe611e7eb25491c354d115) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b)) computes the coefficient of determination of multiple sets of samples with another set of scalar samples If the selected designs for two correlated quantities are different, then the minimum common range of designs is detected and used for analysis. [More...](#ab08e112d95fe611e7eb25491c354d115)  
  [ComputeCoefficientOfDetermination](class_compute_coefficient_of_determination.xhtml#af5745209a41f6d94b036225fa56771e8) ([DataObjectContainer](class_data_object_container.xhtml) the\_field\_data, [DataObjectContainer](class_data_object_container.xhtml) the\_scalar\_data) constructor which sets suitable defaults for all members [More...](#af5745209a41f6d94b036225fa56771e8)  
 ## <a id="pub-attribs" name="pub-attribs"></a>Public Attributes

<a id="ac27cc4bbf7f11e28f3c749e0aa61ed5b"></a>bool [adjusted](class_compute_coefficient_of_determination.xhtml#ac27cc4bbf7f11e28f3c749e0aa61ed5b) is true if the C.o.D. is "adjusted" (default)   
 <a id="af22724fd9c1e0dd42ec296e4784b9df8"></a>[DataObjectContainer](class_data_object_container.xhtml) [field\_data](class_compute_coefficient_of_determination.xhtml#af22724fd9c1e0dd42ec296e4784b9df8) field samples   
 <a id="ab01db6dea146fd2a35511af297363e7b"></a>[DataObjectContainer::string\_vector\_type](class_data_object_container.xhtml#ac293ea0e5c280f69a497ea20f20c60b9) [field\_quantity\_idents](class_compute_coefficient_of_determination.xhtml#ab01db6dea146fd2a35511af297363e7b) the feld quantities to be analyzed. If a quantity ident does not exist in *field\_data*, no error appears. The [CoD](struct_co_d.xhtml "Reference implementation for a quality metric for MOP models. ") is computed for each of these quantities.   
 <a id="a92a339e93315b87782ce1744408c370d"></a>[DataObjectContainer::string\_vector\_type](class_data_object_container.xhtml#ac293ea0e5c280f69a497ea20f20c60b9) [new\_design\_idents](class_compute_coefficient_of_determination.xhtml#a92a339e93315b87782ce1744408c370d) the new design idents for each CoefficientOfDetermination object. The dimension and index space must fit the one of *field\_quantity\_idents*   
 <a id="a30b1bcf63b9bdc707fea30bd96d70447"></a>[DataObjectContainer::string\_vector\_type](class_data_object_container.xhtml#ac293ea0e5c280f69a497ea20f20c60b9) [new\_quantity\_idents](class_compute_coefficient_of_determination.xhtml#a30b1bcf63b9bdc707fea30bd96d70447) the new quantity idents for each CoefficientOfDetermination object. The dimension and index space must fit the one of *field\_quantity\_idents*   
 <a id="ade25e60bd85c8b4abd4f5b416cae0eb9"></a>bool [overwrite\_existing](class_compute_coefficient_of_determination.xhtml#ade25e60bd85c8b4abd4f5b416cae0eb9) is true if already existing output data objects will be replaced. In this case, also all depending objects of the already existing one will be deleted.   
 <a id="a0c1c80374ba4d28153ed219819d24612"></a>[DataObjectContainer](class_data_object_container.xhtml) [scalar\_data](class_compute_coefficient_of_determination.xhtml#a0c1c80374ba4d28153ed219819d24612) scalar samples   
 <a id="aeff6fae62a2847852dc0cc49fa48d31d"></a>[DataObjectContainer::string\_vector\_type](class_data_object_container.xhtml#ac293ea0e5c280f69a497ea20f20c60b9) [scalar\_quantity\_idents](class_compute_coefficient_of_determination.xhtml#aeff6fae62a2847852dc0cc49fa48d31d) the scalar quantities to be analyzed. If a quantity ident does not exist in *scalar\_data*, no error appears. For each field data quantity, a regression model is created. In this regression model, the support points are determined by taking ALL given scalar quantities.   
 <a id="details" name="details"></a>## Detailed Description

### template&lt;dataobject\_types TYPE&gt;  
class ComputeCoefficientOfDetermination&lt; TYPE &gt;

a struct which collects settings for computing the Coefficient Of Determination

Template Parameters TYPEthe field data type 

## Constructor &amp; Destructor Documentation

<a id="af5745209a41f6d94b036225fa56771e8"></a>## [◆ ](#af5745209a41f6d94b036225fa56771e8)ComputeCoefficientOfDetermination()

 [ComputeCoefficientOfDetermination](class_compute_coefficient_of_determination.xhtml)  ( [DataObjectContainer](class_data_object_container.xhtml)  *the\_field\_data*,    [DataObjectContainer](class_data_object_container.xhtml)  *the\_scalar\_data*   ) 

constructor which sets suitable defaults for all members

Parameters the\_field\_datathe subset of field data to be token as input. the\_scalar\_datathe subset of scalar data to be token as input. All quantity idents are extracted. Then for each of the n field quantities one creates a single regression model from what the C.o.D. can be comouted. The regression model contains the specified scalar quantities. (n\*1 new objects will be computed). As a default, the new C.o.D. field objects are appended to the field data quantities as individual designs. The design name is "cod\[scalar\_quantity\_ident\]". If multiple scalar quantities are selected, then the default ident is "cod\[multiple\]". 



## Member Function Documentation

<a id="a47c34ec1e578c2ce27cf1c5fcd0d1704"></a>## [◆ ](#a47c34ec1e578c2ce27cf1c5fcd0d1704)check()

 check  ( [Structure](class_structure.xhtml)  *database*) 

checks the settings on plausibility It throws an exception if there is a problem with the settings. Important: It tries to find out all problems with these settings and then exits the routine.

Parameters databasethe SoS structure 



<a id="ab08e112d95fe611e7eb25491c354d115"></a>## [◆ ](#ab08e112d95fe611e7eb25491c354d115)compute()

 compute  ( [Structure](class_structure.xhtml)  *database*) 

computes the coefficient of determination of multiple sets of samples with another set of scalar samples If the selected designs for two correlated quantities are different, then the minimum common range of designs is detected and used for analysis.

Parameters databasethe output object where new objects are added to