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

# CreateSimpleTrainingPlan Class Reference

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

This class is used to create training plans for the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) competition. It sets up data according to an sample analysis to allow efficient training of the samples. It provides functions to access and cleanup the prepared data.

## Public Member Functions

| Type | Name |
| - | - |
| | [cleanup](#aee46840a9742d1ef1acbcbc0a0558d6a) (data\_handler::DataHandlerBase datahandler, std::vector\< uint64\_t > output\_map) Clean-up the datahandler once the data is not needed anymore. |
| [SimpleTrainingPlan](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_simple_training_plan.md) | [compute](#a21378382fcea59d7dac4cc95d221b79a) (data\_handler::DataHandlerBase datahandler, std::vector\< uint64\_t > output\_map, bool use\_incompletes=true, bool subspace\_filtering=true, bool input\_correlation\_filter=true, number maximum\_input\_correlation=0.9) Generates a [SimpleTrainingPlan](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_simple_training_plan.md) from the classes settings Instances of this class have the ability to cache adapted data inside the datahandler such that the resulting training plan can be used in an efficient way. This is triggered by the outputs for the training. |
| | [CreateSimpleTrainingPlan](#adf28cf2efd51b035883ceb37db728a71) () Constructor. |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [getInputs](#a3a0b3b5d7b78bf28baeb3687819720c3) (data\_handler::DataHandlerBase datahandler, std::vector\< uint64\_t > output\_map) Return the input matrix used by the training plan [CreateSimpleTrainingPlan::compute](#a21378382fcea59d7dac4cc95d221b79a) may cache efficient input matrices for the given outputs. This function provides access to the input matrices used for the given outputs. |
| | [initialize](#aee74475a8bc2fdc6d1a0fed306f683b7) (data\_handler::DataHandlerBase datahandler) Initializes and precalculates the cached plan. |
| IndexVector | [unusedSamples](#a6d765744e1b403aacd8ece89b42de38a) (std::vector\< uint64\_t > output\_map, bool use\_incompletes) Returns the indices of samples that were left out of the training process for the given output\_map. |

## Public Attributes

| Type | Name |
| - | - |
|  ParameterImportanceVector | [input\_importances](#afff2ed8fc84ff999a9ff1b187dc4fe8a) The importances for the mops input variables. |
|  string | **mop\_ident** |
|  int | [number\_of\_folds](#ae29a97cfbae42dc37b7a9be964b5d266) The number of folds for a k-fold training. |
| [TrainingPlanType](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__common#ga8f73c0a2225e425c9ffeecb046034a43) | [training](#a874a26feda81485f63f6bc9d791c8c86) The type of training plan to generate. |

## Detailed Description

This class is used to create training plans for the [ScalarMOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_scalar_m_o_p.md) competition. It sets up data according to an sample analysis to allow efficient training of the samples. It provides functions to access and cleanup the prepared data.

## Member Function Documentation

### cleanup()

```cpp theme={null}
cleanup(
    data_handler::DataHandlerBase datahandler,
    std::vector< uint64_t > output_map
)
```

Clean-up the datahandler once the data is not needed anymore.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The datahandler that keeps the data |
| output\_map | The outputs the datahandler keeps additional data for |

### compute()

```cpp theme={null}
SimpleTrainingPlan compute(
    data_handler::DataHandlerBase datahandler,
    std::vector< uint64_t > output_map,
    bool use_incompletes = true,
    bool subspace_filtering = true,
    bool input_correlation_filter = true,
    number maximum_input_correlation = 0.9
)
```

Generates a [SimpleTrainingPlan](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_simple_training_plan.md) from the classes settings Instances of this class have the ability to cache adapted data inside the datahandler such that the resulting training plan can be used in an efficient way. This is triggered by the outputs for the training.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The Datahandler that stores the input/output matrices. |
| output\_map | The output to create the training plan for |
| use\_incompletes | The setting if incomplete designs should be used |
| subspace\_filtering | Optional subspace filtering |
| input\_correlation\_filter | Optional input correlation filtering |
| maximum\_input\_correlation | Maximum input correlation for optional filtering |

**Returns**

A training plan

### getInputs()

```cpp theme={null}
Matrix getInputs(
    data_handler::DataHandlerBase datahandler,
    std::vector< uint64_t > output_map
)
```

Return the input matrix used by the training plan [CreateSimpleTrainingPlan::compute](#a21378382fcea59d7dac4cc95d221b79a) may cache efficient input matrices for the given outputs. This function provides access to the input matrices used for the given outputs.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The datahandler where the data is located |
| output\_map | The output\_map used |

**Returns**

A reference to the input matrix for the given output\_map

### unusedSamples()

```cpp theme={null}
IndexVector unusedSamples(
    std::vector< uint64_t > output_map,
    bool use_incompletes
)
```

Returns the indices of samples that were left out of the training process for the given output\_map.

**Parameters**

| Name | Description |
| - | - |
| output\_map | The outputs in question for the training |
| use\_incompletes | The setting if incomplete designs should be used |

**Returns**

An ordered vector of indices of samples that were omitted during training.
