    

 ## On this page

  

 

 # CreateCustomModelInterface Struct Reference

 Last update: 16.07.2025 

This class is exported as an director class through SWIG allowing the python context to define derivations from it. A user is then able to implement her own classes satisfying this interface and then being used with the [MOP](class_m_o_p.xhtml "a group of random fields belonging together (either a single random field, or multiple cross-correlat...") framework. [More...](struct_create_custom_model_interface.xhtml#details)

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

<a id="a31de2088e35819f6e03dc305bcc22294"></a>virtual string [\_\_class\_name\_internal\_\_](struct_create_custom_model_interface.xhtml#a31de2088e35819f6e03dc305bcc22294) () Internal helper function to use with de-/serialization.   
 virtual bool [compute](struct_create_custom_model_interface.xhtml#a8c21bb60a1ae5e9c3e6ee1c7cfb6c86d) (::data\_handler::DataHandlerBase datahandler, [TrainingPlanBase](struct_training_plan_base.xhtml) training\_plan, quality\_measure::QualityMeasureBase quality\_measure, [CustomModel](class_custom_model.xhtml) model) Trains the model in the goal language and returns a handle to the newly trained model that is used to access the model in the PluginModelManager. [More...](#a8c21bb60a1ae5e9c3e6ee1c7cfb6c86d)  
 virtual string [displayName](struct_create_custom_model_interface.xhtml#a2d5202c0fb80141117dfbfbb41a46a77) () Returns the name to be displayen in all GUI situations Fallback is class name. [More...](#a2d5202c0fb80141117dfbfbb41a46a77)  
 [PropertyList](class_property_list.xhtml) [getProperties](struct_create_custom_model_interface.xhtml#a1111f254a4d5749fb9e1d62a0bf976f0) () This function makes the properties set on the C++ [CustomModel](class_custom_model.xhtml) class accessible to the Python context. [More...](#a1111f254a4d5749fb9e1d62a0bf976f0)  
 virtual bool [isValid](struct_create_custom_model_interface.xhtml#a1637eb7dcd73ee7adfe215c49b330f44) (::data\_handler::DataHandlerBase datahandler, [TrainingPlanBase](struct_training_plan_base.xhtml) training\_plan) This function is used to check whether the model may be trained or not A python CreateModel... class shall implement this function to let the [MOP](class_m_o_p.xhtml "a group of random fields belonging together (either a single random field, or multiple cross-correlat...") check if the datahandler and training plan are suitable to actually train the model. [More...](#a1637eb7dcd73ee7adfe215c49b330f44)  
 virtual string [licenseLevel](struct_create_custom_model_interface.xhtml#a5a4c33e8a236524ef9d522558e547b27) () Returns a user definable license level for this [CustomModel](class_custom_model.xhtml) "Pro", "Premium" (default), "Enterprise". [More...](#a5a4c33e8a236524ef9d522558e547b27)  
 virtual bool [loadJson](struct_create_custom_model_interface.xhtml#a64a299a9067f1d5c4d8eeb74b39e9f94) ([JsonValue](class_json_value.xhtml) root) This function is used to read the CreateCustomModels configuration state from the the given string. How this is done needs to be implemented in Python. [More...](#a64a299a9067f1d5c4d8eeb74b39e9f94)  
 virtual bool [saveJson](struct_create_custom_model_interface.xhtml#ab8451e71159211ca3e07325fd1f0eeb8) ([JsonValue](class_json_value.xhtml) root) This function returns the state as a Json from the Python of the [CustomModelInterface](struct_custom_model_interface.xhtml "This class provides an API for the CustomModels to be implemented in Python. It is exported as an dir...") to be included in the [CustomModel](class_custom_model.xhtml). It needs to be overloaded in Python. [More...](#ab8451e71159211ca3e07325fd1f0eeb8)  
 ## <a name="pub-attribs"></a>Public Attributes

<a id="a6a5b6cee99023961a726deed7b56d3fa"></a>string **nodeName** <a id="acca011e8d3d2df2bd81e25557245281b"></a>string [workingDir](struct_create_custom_model_interface.xhtml#acca011e8d3d2df2bd81e25557245281b) Access the working directory and the node name from python.   
 <a id="details" name="details"></a>## Detailed Description

This class is exported as an director class through SWIG allowing the python context to define derivations from it. A user is then able to implement her own classes satisfying this interface and then being used with the [MOP](class_m_o_p.xhtml "a group of random fields belonging together (either a single random field, or multiple cross-correlat...") framework.



## Member Function Documentation

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

 virtual bool compute  ( ::data\_handler::DataHandlerBase  *datahandler*,    [TrainingPlanBase](struct_training_plan_base.xhtml)  *training\_plan*,    quality\_measure::QualityMeasureBase  *quality\_measure*,    [CustomModel](class_custom_model.xhtml)  *model*   )   virtual 

Trains the model in the goal language and returns a handle to the newly trained model that is used to access the model in the PluginModelManager.

Parameters datahandlerThe data to train the model with training\_planThe training plan to use when training the model quality\_measureThe quality measure to evaluate the models prognosis quality with modelThe custom model that handles/stores the newly created custom model Returnstrue is the [CustomModel](class_custom_model.xhtml) could be created 



<a id="a2d5202c0fb80141117dfbfbb41a46a77"></a>## [◆ ](#a2d5202c0fb80141117dfbfbb41a46a77)displayName()

 virtual string displayName  ( )   virtual 

Returns the name to be displayen in all GUI situations Fallback is class name.

Returnsthe display name 



<a id="a1111f254a4d5749fb9e1d62a0bf976f0"></a>## [◆ ](#a1111f254a4d5749fb9e1d62a0bf976f0)getProperties()

 [PropertyList](class_property_list.xhtml) getProperties  ( ) 

This function makes the properties set on the C++ [CustomModel](class_custom_model.xhtml) class accessible to the Python context.

ReturnsA property list 



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

 virtual bool isValid  ( ::data\_handler::DataHandlerBase  *datahandler*,    [TrainingPlanBase](struct_training_plan_base.xhtml)  *training\_plan*   )   virtual 

This function is used to check whether the model may be trained or not A python CreateModel... class shall implement this function to let the [MOP](class_m_o_p.xhtml "a group of random fields belonging together (either a single random field, or multiple cross-correlat...") check if the datahandler and training plan are suitable to actually train the model.

Parameters datahandlerThe datahandler containing the data for the training training\_planThe training\_plan describing how to train the model Returnstrue iff the models training is likely to succeed 



<a id="a5a4c33e8a236524ef9d522558e547b27"></a>## [◆ ](#a5a4c33e8a236524ef9d522558e547b27)licenseLevel()

 virtual string licenseLevel  ( )   virtual 

Returns a user definable license level for this [CustomModel](class_custom_model.xhtml) "Pro", "Premium" (default), "Enterprise".

Returnsone of these values ("Premium" by default) 



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

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

This function is used to read the CreateCustomModels configuration state from the the given string. How this is done needs to be implemented in Python.

Parameters stateThe Json string as produced by the saveJson function ReturnsTrue iff loading the state was successful 



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

 virtual bool saveJson  ( [JsonValue](class_json_value.xhtml)  *root*)   virtual 

This function returns the state as a Json from the Python of the [CustomModelInterface](struct_custom_model_interface.xhtml "This class provides an API for the CustomModels to be implemented in Python. It is exported as an dir...") to be included in the [CustomModel](class_custom_model.xhtml). It needs to be overloaded in Python.

ReturnsThe serialization of the python instance