> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# QualityMeasureBase Struct Reference

Part of [MOP quality measure](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__quality__measure)

API for different quality metrics for [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md) models.

## Public Member Functions

| Type | Name |
| - | - |
| virtual number | [error](#ac8a977438da39c4eb58c837aecf65ab4) ([ResidualsBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_residuals_base.md) residuals, uint64\_t output=0)=0 Computes the prediction error of the given residuals according to the input and its selected output. |
|  virtual bool | [expectsCrossValidation](#a449a0307ef1718dade4bf32512fefca9) ()=0 Return true if the quality measure expects the residuals to handle cross validated outputs. |
| virtual number | [measure](#a8d0dfd88a4f82ebefd1210abe81a82d0) ([ResidualsBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_residuals_base.md) residuals, uint64\_t output=0)=0 Destructor. |
|  virtual std::ostream | [write](#a8feeac45da67267b069723ad19404224) (std::ostream)=0 Write the qualityMeasures name out. |

## Detailed Description

API for different quality metrics for [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md) models.

## Member Function Documentation

### error()

```cpp theme={null}
virtual number error(
    ResidualsBase residuals,
    uint64_t output = 0
)
```

`pure virtual`

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

**Parameters**

| Name | Description |
| - | - |
| residuals | The residuals to calculate the quality measure for |
| output | the selected output. |

**Returns**

A value that measures the deviation of the residualss approximation against the selected output.

Implemented in [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md#a4a4f4dfb26f77b55280f37a0610dd5f9), [CoD](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_d.md#a4a4f4dfb26f77b55280f37a0610dd5f9), and [CoD\_adj](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_d__adj.md#a4a4f4dfb26f77b55280f37a0610dd5f9).

### measure()

```cpp theme={null}
virtual number measure(
    ResidualsBase residuals,
    uint64_t output = 0
)
```

`pure virtual`

Destructor.

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

**Parameters**

| Name | Description |
| - | - |
| residuals | The residuals to calculate the quality measure for |
| output | the selected output. |

**Returns**

A value that measures the deviation of the residuals approximation against the selected output.

Implemented in [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md#a4b157842a805ad774da2ab43e530e3d4), [CoD](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_d.md#a4b157842a805ad774da2ab43e530e3d4), and [CoD\_adj](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_d__adj.md#a4b157842a805ad774da2ab43e530e3d4).
