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

# CreateScalarMOP Class Reference

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

Creation/Configuration class for the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) [CreateScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_scalar_m_o_p.md) may be given a number of Model Configurations ([CreateModelBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_create_model_base.md)). By calling compute all relevant models are scheduled and trained based on these Configuration. The resulting [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md) object is the returned.

## Public Member Functions

| Type | Name |
| - | - |
| virtual string | [\_\_str\_\_](#a3031d648b73235d11d64df95db3d84ce) () Output function used in python context. Use this function to print instances of this class in python. |
| | [addConfig](#a8c9e9b33aa08c8adc83c5c603584baf6) ([CreateModelBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_create_model_base.md) config) Add a model configuration to the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md). |
|  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. |
| | [compute](#a2fb8c89a4dd4b11ceb0d033683d0019b) (::data\_handler::DataHandlerBase datahandler) Compute a [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md) from the configuration data stored in this instance and the data contained in the datahandler. |
| | **CreateScalarMOP** (string ident=handler::defaultMOPIdent) |
| | **CreateScalarMOP** ([CreateScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_scalar_m_o_p.md)) |
|  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. |
|  string | **getReportFileLocation** () |
| bool | [isValid](#a54ae75757bd7c8c3936ab036df6d18e3) (::data\_handler::DataHandlerBase datahandler) Test if the configuration of this instance is valid in the context of the given datahandler. |
| virtual | [loadJson](#ae5700ae63985e3e6b30cb716ddb5fdd0) ([JsonValue](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_json_value.md) root) override Funtion to read and set up the model configuration through a JSON string. |
| [CreateScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_scalar_m_o_p.md) | **operator=** ([CreateScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_scalar_m_o_p.md)) |
| | [removeConfig](#a9c0cf0c3b6f4b7797edaf66a1c80742c) (int index) Remove a model configuration from the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md). |
| virtual [JsonValue](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_json_value.md) | [saveJson](#ab4587af0230811304c91f1c0aaa1c9ce) () override Function to write the Models configuration data as a JSON string. |
| | [setInputImportance](#a7b3d9ae89849827c6ce4987f69ad7e9c) (uint64\_t index, [ParameterImportance](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__common#gad5ca470fd07552bf1da82219827c4ec0) importance) Sets the input importance of input variable i to the given importance. All importances of inputs with smaller index that are not yet set Will be set to "optional" Setting an index already define overwrites the old setting. |
| | [setQualityMeasure](#a67e6e9484b7f0afc23dd59b417cf6abc) (quality\_measure::QualityMeasureBase quality\_measure) Let the user set the quality measure. |
| | **setReportFileLocation** (string file\_path) |
| 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. |
|  std::ostream | [write](#aa71b0f057f1559d99319ecb71b50c0f8) (std::ostream os) Writer for the [CreateScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_scalar_m_o_p.md) class. |

## Public Attributes

| Type | Name |
| - | - |
| apply SWIGTYPE \* | **DISOWN** |
|  ParameterImportanceVector | [input\_importances](#afff2ed8fc84ff999a9ff1b187dc4fe8a) The importances for the mops input variables. |
|  int | [max\_number\_parallel\_solve](#a6bdd4bf09fdc60ae0ba692090ee0edfd) The number of parallal solve runs to execute. |
|  int | [number\_of\_folds](#ae29a97cfbae42dc37b7a9be964b5d266) Size of folds if training == TrainingType::KFold valid value range of \[2,100], -1 : Auto - a valid value will be determined internally. |
|  std::vector\< string > | [selected\_outputs](#ae7fef7750942685628c68569b253502f) A vector of selected outputs by the user. |

## Detailed Description

Creation/Configuration class for the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) [CreateScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_create_scalar_m_o_p.md) may be given a number of Model Configurations ([CreateModelBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_create_model_base.md)). By calling compute all relevant models are scheduled and trained based on these Configuration. The resulting [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md) object is the returned.

## Member Function Documentation

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

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

`virtual`

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

**Returns**

string containing the object

### addConfig()

```cpp theme={null}
addConfig(CreateModelBase config)
```

Add a model configuration to the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md).

**Parameters**

| Name | Description |
| - | - |
| config | The model config to add to the training of the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) |

### compute()

```cpp theme={null}
compute(::data_handler::DataHandlerBase datahandler)
```

Compute a [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md) from the configuration data stored in this instance and the data contained in the datahandler.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The data to train the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) with |

**Returns**

The trained [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md)

### isValid()

```cpp theme={null}
bool isValid(::data_handler::DataHandlerBase datahandler)
```

Test if the configuration of this instance is valid in the context of the given datahandler.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The datahandler to creat ethis [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md) from |

**Returns**

true iff configuration is ok with datahandler

### loadJson()

```cpp theme={null}
virtual loadJson(JsonValue root)
```

`override` `virtual`

Funtion to read and set up the model configuration through a JSON string.

**Parameters**

| Name | Description |
| - | - |
| json | The json string to set up the configuration from |

### removeConfig()

```cpp theme={null}
removeConfig(int index)
```

Remove a model configuration from the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md).

**Parameters**

| Name | Description |
| - | - |
| index | index of the model pointer in the vector |

### saveJson()

```cpp theme={null}
virtual JsonValue saveJson()
```

`override` `virtual`

Function to write the Models configuration data as a JSON string.

**Returns**

The configuration of the model as JSON string

### setInputImportance()

```cpp theme={null}
setInputImportance(
    uint64_t index,
    ParameterImportance importance
)
```

Sets the input importance of input variable i to the given importance. All importances of inputs with smaller index that are not yet set Will be set to "optional" Setting an index already define overwrites the old setting.

**Parameters**

| Name | Description |
| - | - |
| index | The index of the input to set |
| importance | The importance of the input with given index |

### setQualityMeasure()

```cpp theme={null}
setQualityMeasure(quality_measure::QualityMeasureBase quality_measure)
```

Let the user set the quality measure.

**Parameters**

| Name | Description |
| - | - |
| quality\_measure | |

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

### DISOWN

```cpp theme={null}
apply SWIGTYPE * DISOWN
```

**Initial value:**

```lua theme={null}
{CreateModelBase * create_model}

             addModelToList(CreateModelBase *create_model, ConfigurationList list)
```
