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

# SimpleTrainingPlan Struct Reference

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

TrainingPlan assigns a in a set of sample each sample a status on how the sample is to be treated during the training of a model A model is trained for a set of outputs.

## Public Member Functions

| Type | Name |
| - | - |
| virtual std::vector\< string > | [getInputNames](#a4f95e721a51d6482217b85546b69b3f9) (::data\_handler::DataHandlerBase datahandler) override Returns the input names from the datahandler. |
| virtual [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [getInputs](#afc52921c8d133bb463c1dfa5a8b7ef22) (::data\_handler::DataHandlerBase datahandler) override Returns the inputs fitting the training plan from the datahandler. |
| virtual string | [getMOPIdent](#a255c5ecec66209c6f30d3d5f15177859) () override Returns the [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md) ident the TrainingPlan is created for. |
| virtual std::vector\< string > | [getOutputNames](#a9f69089e282ffa01fd21080139b05f8f) (::data\_handler::DataHandlerBase datahandler) override Returns the output names from the datahandler. |
| virtual [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [getOutputs](#a11f9260c1f6f8527fb75fa5950f52dfa) (::data\_handler::DataHandlerBase datahandler) override Returns the outputs fitting the training plan from the datahandler. |
| virtual [SampleUsage](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__training__plan#gafce529ac7282fd94c419e8bea8492268) | [getSampleUsageInSet](#a2b8e899313418568acbb9ed5b2ce6ade) (uint64\_t i, uint64\_t j) override getSampleUsage accessor of the j-th sample in the i-th training set |
| virtual [SampleUsage](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__training__plan#gafce529ac7282fd94c419e8bea8492268) | [getSampleUsageInSetRef](#a6c419ba361cd6d96b71e12bf657d940b) (uint64\_t i, uint64\_t j) override getSampleUsageRef non- accessor of the j-th sample in the i-th training set |
| virtual [ParameterImportance](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__common#gad5ca470fd07552bf1da82219827c4ec0) | [inputImportance](#a7afbd5f5b1743bc2423ca855fe2603ab) (uint64\_t i) override parameter returns the ParameterImportance for the i-th parameter |
| virtual [ParameterImportance](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__common#gad5ca470fd07552bf1da82219827c4ec0) | [inputImportanceInSubspace](#aa2ae62e6cab293f7c236e9bf273768f1) (uint64\_t i, uint64\_t j, uint64\_t o=0) override inputImportanceInSubspace returns true if the input j is in the subspace i for the given o-th output in the output-matrix. |
| virtual bool | [isValid](#ad4450a95cde865da632771935f1c57b3) (::data\_handler::DataHandlerBase datahandler) override Checks if the training plan is valid for the give datahandler. |
| virtual uint64\_t | [numInputs](#aae989fb2bbddfd907494bed60516e03d) () override numInputs returns the number of inputs used and defined in this training plan |
| virtual uint64\_t | [numOutputs](#a762eb06ef18a50d3041ce79215855763) () override numOutputs returns the number of outputs used in this training plan |
| virtual uint64\_t | [numSamplesInSet](#ad3ec25fce42515bda59cd6e7154a8258) (uint64\_t i) override numSamplesInSet returns the number of elements (samples) in the training set |
| virtual uint64\_t | [numSets](#a76d26675967b395d8924915b06fd44f9) () override numSets returns the number of training sets in the training plan |
| virtual uint64\_t | [numSubspaces](#a52bd33805e42f83fcad54b402b9d4ced) (uint64\_t i=0) override numSubspaces returns the number of filtered subspaces available in the Training Plan to the i-th output in the output matrix |
| virtual uint64\_t | [numTestSamplesInSet](#aacc683995d55549d854c2d2420aef90c) (uint64\_t i) override numTestSamplesInSet returns the number of elements (samples) in the training set |
| virtual uint64\_t | [numTrainingSamplesInSet](#ad37730c1466388aa53eaeccc3be698d8) (uint64\_t i) override numTrainingSamplesInSet returns the number of elements (samples) in the training set |
| [SimpleTrainingPlan](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_simple_training_plan.md) | [operator=](#a7ed6ac9232f95cc9f4f7871fc0531bb2) ([SimpleTrainingPlan](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_simple_training_plan.md))=default Copy-Assignment. |
| virtual uint64\_t | [output](#a233e0c56c9d1e12b9bc6503a37bc3d8c) (uint64\_t i) override parameter returns the index of the i-th output in the output matrix |
| virtual | [setInputs](#a9e3f96174684a90e8567342ca3ef171a) (::data\_handler::DataHandlerBase datahandler, [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) inputs) Inserts the inputs fitting the training plan from the datahandler. |
| virtual | [setOutputs](#a1a337403848bc684e14fc40d51f42813) (::data\_handler::DataHandlerBase datahandler, [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) outputs) Inserts the outputs fitting the training plan from the datahandler. |
| | [SimpleTrainingPlan](#ab2d903e7c07dc51458d25391ea5c3bf2) ()=default Constructor. |
| | [SimpleTrainingPlan](#aa7b5914712bf07337eb081fc3ac51321) (TrainingPlanVector plan, ParameterImportanceVector params, IndexVector output\_map, SubspaceMatrixList subspace\_matrix\_list, uint64\_t num\_inputs, string mop\_ident=handler::defaultMOPIdent) Initializing Constructor. |
| | [SimpleTrainingPlan](#a148ac409e6a636e27a0a5babd033e340) ([SimpleTrainingPlan](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_simple_training_plan.md))=default Copy-Contructor. |

## Public Attributes

| Type | Name |
| - | - |
|  ParameterImportanceVector | **m\_input\_importance** |
|  string | **m\_mop\_ident** |
|  uint64\_t | **m\_num\_inputs** |
|  IndexVector | **m\_output\_mapping** |
|  SubspaceMatrixList | **m\_subspace\_matrix\_list** |
|  TrainingPlanVector | **m\_training** |

## Detailed Description

TrainingPlan assigns a in a set of sample each sample a status on how the sample is to be treated during the training of a model A model is trained for a set of outputs.

* if the set is a singleton (one element), the trained model is a scalar one
* if the set has more than one element the output dimension should be consistent for all samples. if it is not consistent, we are dealing with incomplete samples. Either the model itself has then to decide how to handle this or this should be handled before the competition is defined i.e. by the (Scalar)[MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md) The training plan is *not* concerned with failed/incomplete inputs. It should always handle a consistent input/output pair

## Constructor & Destructor Documentation

### SimpleTrainingPlan()

```cpp theme={null}
SimpleTrainingPlan(
    TrainingPlanVector plan,
    ParameterImportanceVector params,
    IndexVector output_map,
    SubspaceMatrixList subspace_matrix_list,
    uint64_t num_inputs,
    string mop_ident = handler::defaultMOPIdent
)
```

Initializing Constructor.

**Parameters**

| Name | Description |
| - | - |
| plan | A collection of lists that describe for each sample if its used for training, testing or is ignored Multiple lists are used for instance in the Leave-One-Out or cross-validation scenario |
| params | Defines for each input parameter its importance (if it is ignored, mandatory or optional) |
| output\_map | Defines how the vectors in the output matrix are mapped to the actual output in the training |
| subspace\_matrix\_list | Defines a list of possible input subspaces for each output (after output mapping). This may be used by model for increased approximation quality. |
| num\_inputs | The number of inputs for the training |
| mop\_dent | The mops ident |

## Member Function Documentation

### getInputNames()

```cpp theme={null}
virtual std::vector<string> getInputNames(::data_handler::DataHandlerBase datahandler)
```

`override` `virtual`

Returns the input names from the datahandler.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The datahandler to get the data from |

**Returns**

The input data names

Implements [TrainingPlanBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_training_plan_base.md#a15234ce024e1b13e596ff9c38df3be71).

### getInputs()

```cpp theme={null}
virtual Matrix getInputs(::data_handler::DataHandlerBase datahandler)
```

`override` `virtual`

Returns the inputs fitting the training plan from the datahandler.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The datahandler to get the data from |

**Returns**

The (scalar) input data

Implements [TrainingPlanBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_training_plan_base.md#a6e262334d7e27b9f05121454531fa5b6).

### getMOPIdent()

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

`override` `virtual`

Returns the [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md) ident the TrainingPlan is created for.

**Returns**

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

Implements [TrainingPlanBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_training_plan_base.md#a5df8016765ccb017b2ff5778e3e81558).

### getOutputNames()

```cpp theme={null}
virtual std::vector<string> getOutputNames(::data_handler::DataHandlerBase datahandler)
```

`override` `virtual`

Returns the output names from the datahandler.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The datahandler to get the data from |

**Returns**

The output data names

Implements [TrainingPlanBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_training_plan_base.md#a32c9c6dc56f9b1b5ad2aa3e686d172c7).

### getOutputs()

```cpp theme={null}
virtual Matrix getOutputs(::data_handler::DataHandlerBase datahandler)
```

`override` `virtual`

Returns the outputs fitting the training plan from the datahandler.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The datahandler to get the data from |

**Returns**

The (scalar) output data

Implements [TrainingPlanBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_training_plan_base.md#a8de106670ace9e349ee9c149741b8e44).

### getSampleUsageInSet()

```cpp theme={null}
virtual SampleUsage getSampleUsageInSet(
    uint64_t i,
    uint64_t j
)
```

`override` `virtual`

getSampleUsage accessor of the j-th sample in the i-th training set

**Parameters**

| Name | Description |
| - | - |
| i | Index of the training set |
| j | Index of the sample in training set i |

**Returns**

The sample at the given indices

Implements [TrainingPlanBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_training_plan_base.md#a1c4be324fc1e91c3039a49631f6e2cc9).

### getSampleUsageInSetRef()

```cpp theme={null}
virtual SampleUsage getSampleUsageInSetRef(
    uint64_t i,
    uint64_t j
)
```

`override` `virtual`

getSampleUsageRef non- accessor of the j-th sample in the i-th training set

**Parameters**

| Name | Description |
| - | - |
| i | Index of the training set |
| j | Index of the sample in training set i |

**Returns**

The sample at the given indices

Implements [TrainingPlanBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_training_plan_base.md#af67b70402c8a7610ce4a99c252f53681).

### inputImportance()

```cpp theme={null}
virtual ParameterImportance inputImportance(uint64_t i)
```

`override` `virtual`

parameter returns the ParameterImportance for the i-th parameter

**Parameters**

| Name | Description |
| - | - |
| i | The index of the parameter |

**Returns**

The ParameterUsage of parameter i

Implements [TrainingPlanBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_training_plan_base.md#ab9acd4287a8208fa9a32867cafaf8e46).

### inputImportanceInSubspace()

```cpp theme={null}
virtual ParameterImportance inputImportanceInSubspace(
    uint64_t i,
    uint64_t j,
    uint64_t o = 0
)
```

`override` `virtual`

inputImportanceInSubspace returns true if the input j is in the subspace i for the given o-th output in the output-matrix.

**Parameters**

| Name | Description |
| - | - |
| i | Index of the subspace |
| j | Index of the input parameter |
| o | The o-th output the input is important to |

**Returns**

ParameterImportance of input j in subspace i for the given output

Implements [TrainingPlanBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_training_plan_base.md#a60399ab71c2fcf3a21c9a613997c4822).

### isValid()

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

`override` `virtual`

Checks if the training plan is valid for the give datahandler.

**Returns**

true iff the training plan is valid

Implements [TrainingPlanBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_training_plan_base.md#aed20b1ee85452a87a9e10f39077b94a3).

### numInputs()

```cpp theme={null}
virtual uint64_t numInputs()
```

`override` `virtual`

numInputs returns the number of inputs used and defined in this training plan

**Returns**

The number of parameters the training plan is defined on

Implements [TrainingPlanBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_training_plan_base.md#a5c973e14b896504b0522fc953bb3b2dc).

### numOutputs()

```cpp theme={null}
virtual uint64_t numOutputs()
```

`override` `virtual`

numOutputs returns the number of outputs used in this training plan

**Returns**

The number of outputs the training plan is defined on

Implements [TrainingPlanBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_training_plan_base.md#aad28bd2bb818cf6c433e22e22768086c).

### numSamplesInSet()

```cpp theme={null}
virtual uint64_t numSamplesInSet(uint64_t i)
```

`override` `virtual`

numSamplesInSet returns the number of elements (samples) in the training set

**Parameters**

| Name | Description |
| - | - |
| i | The index of the training set |

**Returns**

The number of elements in set i

Implements [TrainingPlanBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_training_plan_base.md#a0ef7e16a9a52c22ecb59f6148accae62).

### numSets()

```cpp theme={null}
virtual uint64_t numSets()
```

`override` `virtual`

numSets returns the number of training sets in the training plan

**Returns**

The number of training sets

Implements [TrainingPlanBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_training_plan_base.md#ad536b0ba37fa27e95a51c0aa3afc96da).

### numSubspaces()

```cpp theme={null}
virtual uint64_t numSubspaces(uint64_t i = 0)
```

`override` `virtual`

numSubspaces returns the number of filtered subspaces available in the Training Plan to the i-th output in the output matrix

**Parameters**

| Name | Description |
| - | - |
| i | The index of the output |

**Returns**

The number of Subspaces

Implements [TrainingPlanBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_training_plan_base.md#a44682836a8190246e4db84f997a003cc).

### numTestSamplesInSet()

```cpp theme={null}
virtual uint64_t numTestSamplesInSet(uint64_t i)
```

`override` `virtual`

numTestSamplesInSet returns the number of elements (samples) in the training set

**Parameters**

| Name | Description |
| - | - |
| i | The index of the training set |

**Returns**

The number of elements in set i

Implements [TrainingPlanBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_training_plan_base.md#a88109fe981a2b192eb8e09a87ae563ed).

### numTrainingSamplesInSet()

```cpp theme={null}
virtual uint64_t numTrainingSamplesInSet(uint64_t i)
```

`override` `virtual`

numTrainingSamplesInSet returns the number of elements (samples) in the training set

**Parameters**

| Name | Description |
| - | - |
| i | The index of the training set |

**Returns**

The number of elements in set i

Implements [TrainingPlanBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_training_plan_base.md#a13261fec66c7bbac8c07123619300275).

### output()

```cpp theme={null}
virtual uint64_t output(uint64_t i)
```

`override` `virtual`

parameter returns the index of the i-th output in the output matrix

**Parameters**

| Name | Description |
| - | - |
| i | The index of the parameter |

**Returns**

The index of output i in the output matrix

Implements [TrainingPlanBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_training_plan_base.md#a3e0dff9e7373d9800e8abe6a61af4c16).

### setInputs()

```cpp theme={null}
virtual setInputs(
    ::data_handler::DataHandlerBase datahandler,
    Matrix inputs
)
```

`virtual`

Inserts the inputs fitting the training plan from the datahandler.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The datahandler to set the data in |
| inputs | The data to set |

### setOutputs()

```cpp theme={null}
virtual setOutputs(
    ::data_handler::DataHandlerBase datahandler,
    Matrix outputs
)
```

`virtual`

Inserts the outputs fitting the training plan from the datahandler.

**Parameters**

| Name | Description |
| - | - |
| datahandler | The datahandler to set the data in |
| outputs | The data to set |
