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

# MLSModel Class Reference

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

## Public Types

| Type | Name |
| - | - |
|  using | **InternalModelType** = dynardo::math::metamodel::MovingLeastSquares |

## Public Member Functions

| Type | Name |
| - | - |
|  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. |
| virtual [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [evaluate](#a85c04b0ec7ee1ee66e21af920faabb73) ([Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) points, bool extrapolate=true) override Destroys 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. |
| | [MLSModel](#a8865c0221e69fc2a24ce97239504a71c) () Creates an default initialized instance of this class. |
| | [MLSModel](#ad1429cfb27c8c574f54f2c1e98768496) (InternalModelType \*model, quality\_measure::ResidualsBase \*residuals, string description, [PropertyList](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_property_list.md) properties=[PropertyList](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_property_list.md)()) Creates an instance with given a created internal model, the residuals from the training and Properties. You should not call this Constructor by yourself. An instance of this class gets created through the [CreateMLSModel::compute](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_m_l_s_model.md#a428e7ba979340c651ec1372a3307e037) function. |
| | [MLSModel](#afe110995f147bd414e477aa24be08431) ([MLSModel](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_l_s_model.md) other) Copies an instance of this class. |
| [MLSModel](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_l_s_model.md) | [operator=](#a920335ae7d547462b84d66d74143d16d) ([MLSModel](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_l_s_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. |

## Constructor & Destructor Documentation

### MLSModel()

```cpp theme={null}
MLSModel(
    InternalModelType * model,
    quality_measure::ResidualsBase * residuals,
    string description,
    PropertyList properties = PropertyList ()
)
```

Creates an instance with given a created internal model, the residuals from the training and Properties. You should not call this Constructor by yourself. An instance of this class gets created through the [CreateMLSModel::compute](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_m_l_s_model.md#a428e7ba979340c651ec1372a3307e037) function.

**Parameters**

| Name | Description |
| - | - |
| model | A pointer to the internal model type. This Constructor takes ownership of the pointer. |
| residuals | The residuals from the MOPs competition/training process |
| description | A description of the model to be shown in PP |
| properties. | Certain properies for this model. |

## Member Function Documentation

### evaluate()

```cpp theme={null}
virtual Matrix evaluate(
    Matrix points,
    bool extrapolate = true
)
```

`override` `virtual`

Destroys an instance of this class.

Evaluates the model on the given points and returns the values

**Parameters**

| Name | Description |
| - | - |
| points | The input points the model is evaluated on |
| extrapolate | Evaluate the points outside of the bounding box of its trainig data |

**Returns**

The values of the model on the given points

Implements [ModelBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_model_base.md#a5ec7821e9b8c1aaa6c43dc5ca1263f2f).

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