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

# CreateMLSModel Class Reference

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

Defines a Moving Least Squares type model 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. |
| | [CreateMLSModel](#a1b9161355f945f9ee3660223d825ceda) () Creates an default initialized instance of this class. |
| | [CreateMLSModel](#a6e0e8b33c6d727fe1f8789a673f220d5) ([CreateMLSModel](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_m_l_s_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. |
| [CreateMLSModel](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_m_l_s_model.md) | [operator=](#a9cc2b543b7fbf8d49df26da58bf118e7) ([CreateMLSModel](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_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. |

## Public Attributes

| Type | Name |
| - | - |
| [MLSKernel](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__models#ga487e6a20ddbf9775556f15bc0c57212d) | [kernel](#ab1d4dfd9aa65780c7abd0f9b3df55bba) Specifies the kernel function type. |
|  uint64\_t | [max\_order](#ac4bd3143ec6179fe07419cd827281496) Specifies the MLS models maximal order (degree) valid value range of \[TODO], Auto ??? |
|  string | **node\_name** |
|  int | [order](#ac85d5511fdb8d162a7278bfb440ae420) Specifies the MLS models actual order valid value range of \[TODO], -1 : Auto - TODO. |
|  Transformation | [value\_transformation](#a850bec49118fd5e977ea5be55a59d594) Specifies the type of value transformation the model shall use. |
|  string | **working\_dir** |

## Detailed Description

Defines a Moving Least Squares type model Used Properties:

* CoefficientFactorProperty
* ComplexityProperty
* DeltaErrorInputProperty

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