Skip to main content

oSP3D Script API 2023 R2

ScalarMOP Struct Reference

Last update: 12.07.2023

This is only a sketch of the possible ScalarMOPApproximate API Implementation shall be refined if more information is available. More...

Public Member Functions

Matrix activeVariables (::data_handler::DataHandlerBase datahandler, uint64_t output)
 Return the the variable active for the selected output. More...
 
Matrix constantInputs (::data_handler::DataHandlerBase datahandler)
 Return the the variables inactive for all outputs (the constant inputs) More...
 
Matrix copInputs (::data_handler::DataHandlerBase datahandler)
 Compute the individual CoPs of second order for each input of given order for all outputs from the ScalarMOP in the datahandler. More...
 
Matrix copInputs (::data_handler::DataHandlerBase datahandler, uint64_t output)
 Compute the individual CoPs of second order for each input of given order for a single output from the ScalarMOP in the datahandler. More...
 
Matrix copInputsFirstOrder (::data_handler::DataHandlerBase datahandler)
 Compute the individual CoPs of first order for each input of given order for all outputs from the ScalarMOP in the datahandler. More...
 
Matrix copInputsFirstOrder (::data_handler::DataHandlerBase datahandler, uint64_t output)
 Compute the individual CoPs of given order for each input of given order for a single output from the ScalarMOP in the datahandler. More...
 
Matrix copTotal (::data_handler::DataHandlerBase datahandler)
 Return the total CoP from the ScalarMOP in the given datahandler. More...
 
number copTotal (::data_handler::DataHandlerBase datahandler, uint64_t output)
 Return the total CoP of the given output the ScalarMOP in the datahandler. More...
 
Matrix crossValidation (::data_handler::DataHandlerBase datahandler)
 Returns the cross validation values. More...
 
Matrix crossValidation (::data_handler::DataHandlerBase datahandler, uint64_t output)
 
Matrix evaluate (::data_handler::DataHandlerBase datahandler, Matrix values)
 Evaluate the ScalarMOP in the datahandler on the given values with bounds check. More...
 
Matrix evaluate (::data_handler::DataHandlerBase datahandler, Matrix values, uint64_t output)
 Evaluate the ScalarMOP in the datahandler on the given values. Only evaluate the given output. With bounds check. More...
 
Matrix evaluateExtrapolate (::data_handler::DataHandlerBase datahandler, Matrix values)
 Evaluate the ScalarMOP in the datahandler on the given values no bounds check. More...
 
Matrix evaluateExtrapolate (::data_handler::DataHandlerBase datahandler, Matrix values, uint64_t output)
 Evaluate the ScalarMOP in the datahandler on the given values. Only evaluate the given output. No bounds check. More...
 
std::vector< string > filterActiveSampleIds (::data_handler::DataHandlerBase datahandler, std::vector< string > sample_ids, uint64_t model)
 Return the the samples id active for the selected output from the given list of sample_ids. More...
 
std::vector< string > filterConstantInputNames (::data_handler::DataHandlerBase datahandler, std::vector< string > input_names)
 Filter the list of input names such that only the constant ones are returned The Input names need to be in the order as given on the training of the MOP. More...
 
bool isValid (::data_handler::DataHandlerBase datahandler)
 checks the settings More...
 
string modelDescription (::data_handler::DataHandlerBase datahandler, std::size_t output)
 Return the description of the model computing the output for the SclarMOP in the datahandler. More...
 
string modelName (::data_handler::DataHandlerBase datahandler, uint64_t output)
 Return the name of the model computing the output for the SclarMOP in the datahandler. More...
 
Matrix predictionError (::data_handler::DataHandlerBase datahandler)
 Estimate the prediction error for ScalarMOP in the datahandler on the given values. More...
 
number predictionError (::data_handler::DataHandlerBase datahandler, uint64_t output)
 Estimate the prediction error for ScalarMOP in the datahandler on the given values for the given output. More...
 
Matrix qualityMeasureTotal (::data_handler::DataHandlerBase datahandler, ::quality_measure::QualityMeasureBase quality_measure)
 Return the total quality measure w.r.t. the expected responses from the ScalarMOP in the given datahandler. More...
 
number qualityMeasureTotal (::data_handler::DataHandlerBase datahandler, ::quality_measure::QualityMeasureBase quality_measure, uint64_t output)
 Return the total quality measure w.r.t. the expected responses for the given output from the ScalarMOP in the given datahandler. More...
 
Matrix sampleStatus (::data_handler::DataHandlerBase datahandler)
 Return the the samples active/inactive for all models. More...
 
Matrix sampleStatus (::data_handler::DataHandlerBase datahandler, uint64_t model)
 Return the the samples id active for the selected output from the given list of sample_ids. More...
 
 ScalarMOP (string mop_ident=handler::defaultMOPIdent)
 

Detailed Description

This is only a sketch of the possible ScalarMOPApproximate API Implementation shall be refined if more information is available.

Member Function Documentation

◆ activeVariables()

Matrix activeVariables ( ::data_handler::DataHandlerBase  datahandler,
uint64_t  output 
)

Return the the variable active for the selected output.

Parameters
datahandlerThe database to take the ScalarMOP from
outputThe selected output
Returns
A vector of bools specifying for each input if it is active

◆ constantInputs()

Matrix constantInputs ( ::data_handler::DataHandlerBase  datahandler)

Return the the variables inactive for all outputs (the constant inputs)

Parameters
datahandlerThe database to take the ScalarMOP from
Returns
A vector of bools specifying for each input if it is constant

◆ copInputs() [1/2]

Matrix copInputs ( ::data_handler::DataHandlerBase  datahandler)

Compute the individual CoPs of second order for each input of given order for all outputs from the ScalarMOP in the datahandler.

Parameters
datahandlerThe datahandler
Returns
the individual CoP values of each input for each output The CoP matrix is organized as follows:
  • each column corresponds to one design variable
  • each row corresponds to one output variable

◆ copInputs() [2/2]

Matrix copInputs ( ::data_handler::DataHandlerBase  datahandler,
uint64_t  output 
)

Compute the individual CoPs of second order for each input of given order for a single output from the ScalarMOP in the datahandler.

Parameters
datahandlerThe datahandler
outputThe output to compute for
Returns
the individual CoP values of each input for a single output output The CoP matrix is organized as follows:
  • each column corresponds to one design variable
  • each row corresponds to one output variable

◆ copInputsFirstOrder() [1/2]

Matrix copInputsFirstOrder ( ::data_handler::DataHandlerBase  datahandler)

Compute the individual CoPs of first order for each input of given order for all outputs from the ScalarMOP in the datahandler.

Parameters
datahandlerThe datahandler
Returns
the individual CoP values of each input for each output The CoP matrix is organized as follows:
  • each column corresponds to one design variable
  • each row corresponds to one output variable

◆ copInputsFirstOrder() [2/2]

Matrix copInputsFirstOrder ( ::data_handler::DataHandlerBase  datahandler,
uint64_t  output 
)

Compute the individual CoPs of given order for each input of given order for a single output from the ScalarMOP in the datahandler.

Parameters
datahandlerThe datahandler
outputThe output to compute for
Returns
the individual CoP values of each input for a single output output The CoP matrix is organized as follows:
  • each column corresponds to one design variable
  • each row corresponds to one output variable

◆ copTotal() [1/2]

Matrix copTotal ( ::data_handler::DataHandlerBase  datahandler)

Return the total CoP from the ScalarMOP in the given datahandler.

Parameters
datahandlerThe datahandler
Returns
The total CoP of all outputs

◆ copTotal() [2/2]

number copTotal ( ::data_handler::DataHandlerBase  datahandler,
uint64_t  output 
)

Return the total CoP of the given output the ScalarMOP in the datahandler.

Parameters
datahandlerThe datahandler
outputThe output to compute the CoP for
Returns
The total CoP of given output

◆ crossValidation()

Matrix crossValidation ( ::data_handler::DataHandlerBase  datahandler)

Returns the cross validation values.

Parameters
datahandlerThe datahandler containing the ScalarMOP
Returns
cross validation data from the ScalarMOP

◆ evaluate() [1/2]

Matrix evaluate ( ::data_handler::DataHandlerBase  datahandler,
Matrix  values 
)

Evaluate the ScalarMOP in the datahandler on the given values with bounds check.

Parameters
datahandlerThe datahandler containing the ScalarMOP
valuesThe values to evaluate the scalarMOP on
Returns
Values approximated by the ScalarMOP

◆ evaluate() [2/2]

Matrix evaluate ( ::data_handler::DataHandlerBase  datahandler,
Matrix  values,
uint64_t  output 
)

Evaluate the ScalarMOP in the datahandler on the given values. Only evaluate the given output. With bounds check.

Parameters
datahandlerThe datahandler containing the ScalarMOP
valuesThe values to evaluate the scalarMOP on
outputThe output to evaluate
Returns
Values approximated by the ScalarMOP

◆ evaluateExtrapolate() [1/2]

Matrix evaluateExtrapolate ( ::data_handler::DataHandlerBase  datahandler,
Matrix  values 
)

Evaluate the ScalarMOP in the datahandler on the given values no bounds check.

Parameters
datahandlerThe datahandler containing the ScalarMOP
valuesThe values to evaluate the scalarMOP on
Returns
Values approximated by the ScalarMOP

◆ evaluateExtrapolate() [2/2]

Matrix evaluateExtrapolate ( ::data_handler::DataHandlerBase  datahandler,
Matrix  values,
uint64_t  output 
)

Evaluate the ScalarMOP in the datahandler on the given values. Only evaluate the given output. No bounds check.

Parameters
datahandlerThe datahandler containing the ScalarMOP
valuesThe values to evaluate the scalarMOP on
outputThe output to evaluate
Returns
Values approximated by the ScalarMOP

◆ filterActiveSampleIds()

std::vector<string> filterActiveSampleIds ( ::data_handler::DataHandlerBase  datahandler,
std::vector< string >  sample_ids,
uint64_t  model 
)

Return the the samples id active for the selected output from the given list of sample_ids.

Parameters
datahandlerThe database to take the ScalarMOP from
sample_idsA list of sample ids corresponding to the used samples
modelThe selected model
Returns
A vector of strings representing the ids of the active samples

◆ filterConstantInputNames()

std::vector<string> filterConstantInputNames ( ::data_handler::DataHandlerBase  datahandler,
std::vector< string >  input_names 
)

Filter the list of input names such that only the constant ones are returned The Input names need to be in the order as given on the training of the MOP.

Parameters
datahandlerThe database to take the ScalarMOP from
input_namesThe names of the inputs in the order of the training
Returns
A list of input names representing the constant inputs

◆ isValid()

bool isValid ( ::data_handler::DataHandlerBase  datahandler)

checks the settings

Parameters
datahandlerThe datahandler we refer to
Returns
true iff the datahandler may be accessed

◆ modelDescription()

string modelDescription ( ::data_handler::DataHandlerBase  datahandler,
std::size_t  output 
)

Return the description of the model computing the output for the SclarMOP in the datahandler.

Parameters
datahandlerThe datahandler
outputThe output under consideration
Returns
A string containing the description of the model

◆ modelName()

string modelName ( ::data_handler::DataHandlerBase  datahandler,
uint64_t  output 
)

Return the name of the model computing the output for the SclarMOP in the datahandler.

Parameters
datahandlerThe datahandler
outputThe output under consideration
Returns
A string containing the name of the model

◆ predictionError() [1/2]

Matrix predictionError ( ::data_handler::DataHandlerBase  datahandler)

Estimate the prediction error for ScalarMOP in the datahandler on the given values.

Parameters
datahandlerThe datahandler containing the ScalarMOP
Returns
The prediction error

◆ predictionError() [2/2]

number predictionError ( ::data_handler::DataHandlerBase  datahandler,
uint64_t  output 
)

Estimate the prediction error for ScalarMOP in the datahandler on the given values for the given output.

Parameters
datahandlerThe datahandler containing the ScalarMOP
outputThe selected output
Returns
Values approximated by the ScalarMOP

◆ qualityMeasureTotal() [1/2]

Matrix qualityMeasureTotal ( ::data_handler::DataHandlerBase  datahandler,
::quality_measure::QualityMeasureBase  quality_measure 
)

Return the total quality measure w.r.t. the expected responses from the ScalarMOP in the given datahandler.

Parameters
datahandlerThe datahandler
quality_measureThe quality measure
Returns
The total quality measure of all outputs w.r.t. the expected responses

◆ qualityMeasureTotal() [2/2]

number qualityMeasureTotal ( ::data_handler::DataHandlerBase  datahandler,
::quality_measure::QualityMeasureBase  quality_measure,
uint64_t  output 
)

Return the total quality measure w.r.t. the expected responses for the given output from the ScalarMOP in the given datahandler.

Parameters
datahandlerThe datahandler
quality_measureThe quality measure
outputThe output to compute for
Returns
The total quality measure of all outputs w.r.t. the expected responses

◆ sampleStatus() [1/2]

Matrix sampleStatus ( ::data_handler::DataHandlerBase  datahandler)

Return the the samples active/inactive for all models.

Parameters
datahandlerThe database to take the ScalarMOP from
Returns
A matrix of bools specifying for each sample/model if it is active/inactive

◆ sampleStatus() [2/2]

Matrix sampleStatus ( ::data_handler::DataHandlerBase  datahandler,
uint64_t  model 
)

Return the the samples id active for the selected output from the given list of sample_ids.

Parameters
datahandlerThe database to take the ScalarMOP from
modelThe selected model
Returns
A vector of bools specifying for each samples if it is active/inactive for the model

Connect with Ansys