> ## 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.

# CreateLegacyMOQModel Class Reference

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

Defines a LegacyMOPModel This type of model wraps the old MOQ and makes it accessible to The [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md) framework. Used Properties:

## Public Member Functions

| Type | Name |
| - | - |
| virtual string | [\_\_str\_\_](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_create_model_base.md#a3031d648b73235d11d64df95db3d84ce) () Output function used in python context. Use this function to print instances of this class in python. |
|  virtual | [addProperty](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_property_user_base.md#aedfb47575823522e6a6d22ce6c12e826) ([PropertyBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_property_base.md) p) Properties that help the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) scheduling the Models to be built The properties class needs to be implemented for the specific model type. |
| [ModelBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_model_base.md) \* | [compute](#a428e7ba979340c651ec1372a3307e037) (::data\_handler::DataHandlerBase datahandler, [TrainingPlanBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_training_plan_base.md) training\_plan, quality\_measure::QualityMeasureBase quality\_measure) Builds the model from the given samples and returns the model. |
| | [CreateLegacyMOQModel](#a604dd8fac349f4031c8e7bcac66ed2f6) () Creates an default initialized instance of this class. |
| | [CreateLegacyMOQModel](#af974357aa62311511d47c7b6c5f1a843) ([CreateLegacyMOQModel](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_legacy_m_o_q_model.md) other) Copies an instance of this class. |
|  virtual [PropertyList](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_property_list.md) | [getProperties](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_property_user_base.md#a0e1dd7df82728594fc128ed1c797b0c0) () Returns the properties stored by this user. |
| virtual bool | [isValid](#a1a42d0ff7ef3b9c17965ecc14310ed5d) (::data\_handler::DataHandlerBase datahandler, [TrainingPlanBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_training_plan_base.md) training\_plan) override Destroys an instance of this class. |
| [CreateLegacyMOQModel](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_legacy_m_o_q_model.md) | [operator=](#a4be004a83db31e2a7b337478420ffe90) ([CreateLegacyMOQModel](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_legacy_m_o_q_model.md)) Copies an instance of this class. |
| virtual | [transferProperties](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_property_user_base.md#ab9507274f126b856fb69cd621f0f9fb4) ([PropertyList](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_property_list.md) property\_list) Convenience function to transfer a complete [PropertyList](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_property_list.md) into the model. |

## Public Attributes

| Type | Name |
| - | - |
|  number | [altsupport](#ad59f74edd2cee4b6ca041c129e4c0a3c) Defines the usage of localization points. Default: 0. If this value is 0, then each sample (design) of a DOE will be used directly as localization point for the RBF interpolation. If this value is greater zero, then it is equal to the number of localization points to be used (eg. 1000). The localization points will be samples to match roughly the statistical properties of the input DOE. Use this option, if there are too many samples and the creation of the default eta model will take too much time. |
|  number | [anisotropic](#a8e6f94721593ca05c2be2ed71d594b5e) Defines if the RBF interpolation functions are anisotropic. Value 1: Ansitotropy is used; Value 0: RBF funtions are isotropic. Anisotropy means in this context, that the RBF functions are scaled by a distance factor individually for each input parameter dimension. |
|  number | [corrfilter](#a2414b09a907b9949960cca3eb4483f90) Defines the usage of the correlation filter. The correlation filter tries to eliminate input parameters that are not significantly correlated to the response. The amount of correlation is measured in terms of a polynomial regression model. Only as many inputs are consideres as important as long as they increase the [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) of the polynomial regression model. Therefore, one may ensure that certain parameters are not removed by defining them as 'mandatory' or by using the mincorr option that defines the significance level of important parameters. A value of 0 means not active; The filter is active for a value of greater than 0. In the latter case, the filter becomes only active if more inputs are available than the number in this item. |
|  bool | [generate\_auto\_settings](#a335ea5c4234dde32c761eb073e7378ff) if true, then FMOP will automatically generate a settings object, if false the settings of this object will be chosen. |
|  number | [mincorr](#a6800f9a034fa5e0bc4a6482700b6207e) Defines the significance level of the correlation filter This value is only used when the corrfilter option is set (corrfilter!=0). It ensures that input parameters with a 'significant' linear correlation to the response are not eliminated as 'unimportant' when the correlation filter is active. The value defines a significance value from which the actual correlation value is computed that is required to enforce that an input becomes mandatory if the correlation between this input and the response is greater than this limit value. The significance value is first translated into a t-distribution of a test variable. |
|  number | [mineval](#aeccb5f3a3f09db023b55ab5326ae7ff0) Defines the input-correlation filter Value of zero: There is not filter using input-correlations Values greater than zero: This is the smallest eigenvalue of the input-correlation matrix which is interpreted as non-zero! The inputs associated with eigenvalues below will be eliminated. |
|  string | **node\_name** |
| number | [reshuffles](#aa5769b13c65c9e6ee1eae71b2b078b5f) Defines the number of shuffles in the computation of the sensitivities. Default value: 0. The special value of 0 means that as many shuffles as designs are used. This version takes most time, but is most accurate. A value greater 0 defines the actual number of shuffles. |
| number | [tolerance](#a593cce5ceb99745d936991573c146cf2) tolerance for the internal iterative algorithm This tolerance is used by the optimizer as termination criterion that tests: (a) gradients being near zero (b) objective function value improvements decline to nearly zero. The optimizer is used to determine the model coefficients. |
|  bool | [use\_basic\_fit](#a1fa6b21ae19828191536d2c5fbeb83a2) if true, then FMOP will use basic polynomial regression fit only. |
|  string | **working\_dir** |

## Detailed Description

Defines a LegacyMOPModel This type of model wraps the old MOQ and makes it accessible to The [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md) framework. Used Properties:

* ComplexityProperty

## Member Function Documentation

### \_\_str\_\_()

```cpp theme={null}
virtual string __str__()
```

`virtual` `inherited`

Output function used in python context. Use this function to print instances of this class in python.

**Returns**

string containing the object

Reimplemented in [CreateCustomModel](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_custom_model.md#a3031d648b73235d11d64df95db3d84ce).

### compute()

```cpp theme={null}
ModelBase * compute(
    ::data_handler::DataHandlerBase datahandler,
    TrainingPlanBase training_plan,
    quality_measure::QualityMeasureBase quality_measure
)
```

Builds the model from the given samples and returns the model.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The datahandler that contains the samples |
| training\_plan | The training plan that specifies how the model will be trained |
| quality\_measure | The quality measure that allows to compute a models approximation quality |

**Returns**

The trained model iff not cancelled

### isValid()

```cpp theme={null}
virtual bool isValid(
    ::data_handler::DataHandlerBase datahandler,
    TrainingPlanBase training_plan
)
```

`override` `virtual`

Destroys an instance of this class.

This function checks if the model can validly be trained from the given samples

**Parameters**

| Name | Description |
| - | - |
| samples | The samples the model shall be trained with. |

**Returns**

True iff th emodel can be trained with the configuration data, the properties and samples

Implements [CreateModelBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_create_model_base.md#a1202ca4468e899d1e6d321ebf59e67a1).

### transferProperties()

```cpp theme={null}
virtual transferProperties(PropertyList property_list)
```

`virtual` `inherited`

Convenience function to transfer a complete [PropertyList](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_property_list.md) into the model.

**Parameters**

| Name | Description |
| - | - |
| property\_list | The properties to transfer into this model |

## Member Data Documentation

### reshuffles

```cpp theme={null}
number reshuffles
```

Defines the number of shuffles in the computation of the sensitivities. Default value: 0. The special value of 0 means that as many shuffles as designs are used. This version takes most time, but is most accurate. A value greater 0 defines the actual number of shuffles.

> [!NOTE]
>
> Do not mistake this with the number of shuffles in the cross-validation! This is different!

### tolerance

```cpp theme={null}
number tolerance
```

tolerance for the internal iterative algorithm This tolerance is used by the optimizer as termination criterion that tests: (a) gradients being near zero (b) objective function value improvements decline to nearly zero. The optimizer is used to determine the model coefficients.

Default: 0.001; Meaningful values are 1e-1 ... 1e-4.
