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

# CreateLegacyMOPModel 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 [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md) 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. |
| | [CreateLegacyMOPModel](#ad61adf030cb568f50d71d165d420b61e) () Creates an default initialized instance of this class. |
| | [CreateLegacyMOPModel](#a76549ea2eabdc1ff32424f570ad5e41f) ([CreateLegacyMOPModel](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_legacy_m_o_p_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. |
| [CreateLegacyMOPModel](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_legacy_m_o_p_model.md) | [operator=](#a3b2ee4d9715a1fa272b70b3f62f78955) ([CreateLegacyMOPModel](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_legacy_m_o_p_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 |
| - | - |
|  string | **node\_name** |
|  bool | [use\_BoxCox](#ae3a2c0110357b15e55285a625c21e028) if true, then Box Cox is tested |
|  bool | [use\_CoD\_filter](#ad454212264147757ead8a6b1a702019d) if true, then [CoD](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_d.md) filter is used |
|  bool | [use\_CoI\_filter](#adb678f343269092390e130a99b1d2dad) if true, then CoI filter is used |
|  bool | [use\_correlation\_filter](#afd89ea7f62227924199890c55f41439f) if true, then correlation filter is used |
|  bool | [use\_input\_correlation\_filter](#a7bc1de6eaf8c93f135797f06992972a4) if true, then input correlation filter is used |
|  bool | [use\_kriging](#a777c1c86f4a98e63b65b2b395b8b551c) if true, then kriging is tested |
|  bool | [use\_kriging\_anisotropic](#a21ae967782584b3e9eedcde16144132d) if true, then anisotropic kriging is tested |
|  bool | [use\_MLS](#ae1d69f069ec0d2747cbee8c5e629dfd7) if true, then MLS is tested |
|  bool | [use\_polynomials](#a705beab6587cd69b7d89d4ea6d830a2e) if true, then polynomial models are tested |
|  bool | [use\_significance\_filter](#aea97490d1b9082db4c2ec6b37012c17e) if true, then significance filter is used |
|  bool | [use\_Spearman\_filter](#a4545c85407236294e80529caabe599af) if true, then Spearman filter is used |
|  string | **working\_dir** |

## Detailed Description

Defines a LegacyMOPModel. This type of model wraps the old [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md) 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 |
