    

 ## On this page

  

 

 # CreateScalarMOP Class Reference

 Last update: 16.07.2025 

Creation/Configuration class for the [ScalarMOP](struct_scalar_m_o_p.xhtml "This is only a sketch of the possible ScalarMOPApproximate API Implementation shall be refined if mor...") [CreateScalarMOP](class_create_scalar_m_o_p.xhtml "Creation/Configuration class for the ScalarMOP CreateScalarMOP may be given a number of Model Configu...") may be given a number of Model Configurations ([CreateModelBase](struct_create_model_base.xhtml "API for all MOP3 model creation classes. ")). By calling compute all relevant models are scheduled and trained based on these Configuration. The resulting [MOP](class_m_o_p.xhtml "a group of random fields belonging together (either a single random field, or multiple cross-correlat...") object is the returned. [More...](class_create_scalar_m_o_p.xhtml#details)

## <a name="pub-methods"></a>Public Member Functions

virtual string [\_\_str\_\_](class_create_scalar_m_o_p.xhtml#a3031d648b73235d11d64df95db3d84ce) () Output function used in python context. Use this function to print instances of this class in python. [More...](#a3031d648b73235d11d64df95db3d84ce)  
  [addConfig](class_create_scalar_m_o_p.xhtml#a8c9e9b33aa08c8adc83c5c603584baf6) ([CreateModelBase](struct_create_model_base.xhtml) config) Add a model configuration to the [ScalarMOP](struct_scalar_m_o_p.xhtml "This is only a sketch of the possible ScalarMOPApproximate API Implementation shall be refined if mor..."). [More...](#a8c9e9b33aa08c8adc83c5c603584baf6)  
 <a id="aedfb47575823522e6a6d22ce6c12e826"></a>virtual [addProperty](class_property_user_base.xhtml#aedfb47575823522e6a6d22ce6c12e826) ([PropertyBase](struct_property_base.xhtml) p) Properties that help the [ScalarMOP](struct_scalar_m_o_p.xhtml "This is only a sketch of the possible ScalarMOPApproximate API Implementation shall be refined if mor...") scheduling the Models to be built The properties class needs to be implemented for the specific model type.   
  [compute](class_create_scalar_m_o_p.xhtml#a2fb8c89a4dd4b11ceb0d033683d0019b) (::data\_handler::DataHandlerBase datahandler) Compute a [MOP](class_m_o_p.xhtml "a group of random fields belonging together (either a single random field, or multiple cross-correlat...") from the configuration data stored in this instance and the data contained in the datahandler. [More...](#a2fb8c89a4dd4b11ceb0d033683d0019b)  
 <a id="ae4a09cd84e3858bc76cb702438e1ad1e"></a> **CreateScalarMOP** (string ident=handler::defaultMOPIdent) <a id="a67e05745baa99813aa581ce2f39a665d"></a> **CreateScalarMOP** ([CreateScalarMOP](class_create_scalar_m_o_p.xhtml)) <a id="a0e1dd7df82728594fc128ed1c797b0c0"></a>virtual [PropertyList](class_property_list.xhtml) [getProperties](class_property_user_base.xhtml#a0e1dd7df82728594fc128ed1c797b0c0) () Returns the properties stored by this user.   
 <a id="a289a714be5b66f689296165b3674168a"></a>string **getReportFileLocation** () bool [isValid](class_create_scalar_m_o_p.xhtml#a54ae75757bd7c8c3936ab036df6d18e3) (::data\_handler::DataHandlerBase datahandler) Test if the configuration of this instance is valid in the context of the given datahandler. [More...](#a54ae75757bd7c8c3936ab036df6d18e3)  
 virtual [loadJson](class_create_scalar_m_o_p.xhtml#ae5700ae63985e3e6b30cb716ddb5fdd0) ([JsonValue](class_json_value.xhtml) root) override Funtion to read and set up the model configuration through a JSON string. [More...](#ae5700ae63985e3e6b30cb716ddb5fdd0)  
 <a id="adfe2096754cae18e2418e1bdf92e7fbe"></a>[CreateScalarMOP](class_create_scalar_m_o_p.xhtml) **operator=** ([CreateScalarMOP](class_create_scalar_m_o_p.xhtml)) virtual [JsonValue](class_json_value.xhtml) [saveJson](class_create_scalar_m_o_p.xhtml#ab4587af0230811304c91f1c0aaa1c9ce) () override Function to write the Models configuration data as a JSON string. [More...](#ab4587af0230811304c91f1c0aaa1c9ce)  
  [setInputImportance](class_create_scalar_m_o_p.xhtml#a7b3d9ae89849827c6ce4987f69ad7e9c) (uint64\_t index, [ParameterImportance](group__common.xhtml#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. [More...](#a7b3d9ae89849827c6ce4987f69ad7e9c)  
  [setQualityMeasure](class_create_scalar_m_o_p.xhtml#a67e6e9484b7f0afc23dd59b417cf6abc) (quality\_measure::QualityMeasureBase quality\_measure) Let the user set the quality measure. [More...](#a67e6e9484b7f0afc23dd59b417cf6abc)  
 <a id="a6577bd4b989ecd567a2f7263e4592c07"></a> **setReportFileLocation** (string file\_path) virtual [transferProperties](class_property_user_base.xhtml#ab9507274f126b856fb69cd621f0f9fb4) ([PropertyList](class_property_list.xhtml) property\_list) Convenience function to transfer a complete [PropertyList](class_property_list.xhtml "Container class for handling properties Uses templates to easily find and cast configurations of diff...") into the model. [More...](#ab9507274f126b856fb69cd621f0f9fb4)  
 <a id="aa71b0f057f1559d99319ecb71b50c0f8"></a>std::ostream [write](class_create_scalar_m_o_p.xhtml#aa71b0f057f1559d99319ecb71b50c0f8) (std::ostream os) Writer for the [CreateScalarMOP](class_create_scalar_m_o_p.xhtml "Creation/Configuration class for the ScalarMOP CreateScalarMOP may be given a number of Model Configu...") class.   
 ## <a name="pub-attribs"></a>Public Attributes

apply SWIGTYPE \* **DISOWN** <a id="afff2ed8fc84ff999a9ff1b187dc4fe8a"></a>ParameterImportanceVector [input\_importances](class_create_scalar_m_o_p.xhtml#afff2ed8fc84ff999a9ff1b187dc4fe8a) The importances for the mops input variables.   
 <a id="aff8cebd702944111629b631030991908"></a>int **m\_max\_number\_parallel\_solve** <a id="aa81637cde58fcc50fa1cf29a70edd9c8"></a>std::vector&lt; string &gt; **m\_selected\_outputs** <a id="ae29a97cfbae42dc37b7a9be964b5d266"></a>int [number\_of\_folds](class_create_scalar_m_o_p.xhtml#ae29a97cfbae42dc37b7a9be964b5d266) Size of folds if training == TrainingType::KFold valid value range of \[2,100\], -1 : Auto - a valid value will be determined internally.   
 <a id="details" name="details"></a>## Detailed Description

Creation/Configuration class for the [ScalarMOP](struct_scalar_m_o_p.xhtml "This is only a sketch of the possible ScalarMOPApproximate API Implementation shall be refined if mor...") [CreateScalarMOP](class_create_scalar_m_o_p.xhtml "Creation/Configuration class for the ScalarMOP CreateScalarMOP may be given a number of Model Configu...") may be given a number of Model Configurations ([CreateModelBase](struct_create_model_base.xhtml "API for all MOP3 model creation classes. ")). By calling compute all relevant models are scheduled and trained based on these Configuration. The resulting [MOP](class_m_o_p.xhtml "a group of random fields belonging together (either a single random field, or multiple cross-correlat...") object is the returned.



## Member Function Documentation

<a id="a3031d648b73235d11d64df95db3d84ce"></a>## [◆ ](#a3031d648b73235d11d64df95db3d84ce)\_\_str\_\_()

 virtual string \_\_str\_\_  ( )   virtual 

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

Returnsstring containing the object 



<a id="a8c9e9b33aa08c8adc83c5c603584baf6"></a>## [◆ ](#a8c9e9b33aa08c8adc83c5c603584baf6)addConfig()

 addConfig  ( [CreateModelBase](struct_create_model_base.xhtml)  *config*) 

Add a model configuration to the [ScalarMOP](struct_scalar_m_o_p.xhtml "This is only a sketch of the possible ScalarMOPApproximate API Implementation shall be refined if mor...").

Parameters configThe model config to add to the training of the [ScalarMOP](struct_scalar_m_o_p.xhtml "This is only a sketch of the possible ScalarMOPApproximate API Implementation shall be refined if mor...") 



<a id="a2fb8c89a4dd4b11ceb0d033683d0019b"></a>## [◆ ](#a2fb8c89a4dd4b11ceb0d033683d0019b)compute()

 compute  ( ::data\_handler::DataHandlerBase  *datahandler*) 

Compute a [MOP](class_m_o_p.xhtml "a group of random fields belonging together (either a single random field, or multiple cross-correlat...") from the configuration data stored in this instance and the data contained in the datahandler.

Parameters datahandlerThe data to train the [ScalarMOP](struct_scalar_m_o_p.xhtml "This is only a sketch of the possible ScalarMOPApproximate API Implementation shall be refined if mor...") with ReturnsThe trained [MOP](class_m_o_p.xhtml "a group of random fields belonging together (either a single random field, or multiple cross-correlat...") 



<a id="a54ae75757bd7c8c3936ab036df6d18e3"></a>## [◆ ](#a54ae75757bd7c8c3936ab036df6d18e3)isValid()

 bool isValid  ( ::data\_handler::DataHandlerBase  *datahandler*) 

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

Parameters datahandlerThe datahandler to creat ethis [MOP](class_m_o_p.xhtml "a group of random fields belonging together (either a single random field, or multiple cross-correlat...") from Returnstrue iff configuration is ok with datahandler 



<a id="ae5700ae63985e3e6b30cb716ddb5fdd0"></a>## [◆ ](#ae5700ae63985e3e6b30cb716ddb5fdd0)loadJson()

 virtual loadJson  ( [JsonValue](class_json_value.xhtml)  *root*)   overridevirtual 

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

Parameters jsonThe json string to set up the configuration from 



<a id="ab4587af0230811304c91f1c0aaa1c9ce"></a>## [◆ ](#ab4587af0230811304c91f1c0aaa1c9ce)saveJson()

 virtual [JsonValue](class_json_value.xhtml) saveJson  ( )   overridevirtual 

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

ReturnsThe configuration of the model as JSON string 



<a id="a7b3d9ae89849827c6ce4987f69ad7e9c"></a>## [◆ ](#a7b3d9ae89849827c6ce4987f69ad7e9c)setInputImportance()

 setInputImportance  ( uint64\_t  *index*,    [ParameterImportance](group__common.xhtml#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.

Parameters indexThe index of the input to set importanceThe importance of the input with given index 



<a id="a67e6e9484b7f0afc23dd59b417cf6abc"></a>## [◆ ](#a67e6e9484b7f0afc23dd59b417cf6abc)setQualityMeasure()

 setQualityMeasure  ( quality\_measure::QualityMeasureBase  *quality\_measure*) 

Let the user set the quality measure.

Parameters quality\_measure



<a id="ab9507274f126b856fb69cd621f0f9fb4"></a>## [◆ ](#ab9507274f126b856fb69cd621f0f9fb4)transferProperties()

 virtual transferProperties  ( [PropertyList](class_property_list.xhtml)  *property\_list*)   virtualinherited 

Convenience function to transfer a complete [PropertyList](class_property_list.xhtml "Container class for handling properties Uses templates to easily find and cast configurations of diff...") into the model.

Parameters property\_listThe properties to transfer into this model 



## Member Data Documentation

<a id="aa936348f586ed71a2a8585a4b16b20fc"></a>## [◆ ](#aa936348f586ed71a2a8585a4b16b20fc)DISOWN

 apply SWIGTYPE \* DISOWN

**Initial value:**{[CreateModelBase](struct_create_model_base.xhtml "API for all MOP3 model creation classes. ") * create_model}



 addModelToList([CreateModelBase](struct_create_model_base.xhtml "API for all MOP3 model creation classes. ") *create_model, ConfigurationList list)