Preparing your model

To import your model and use it in a decision flow, first, you need to dump your trained model.
Let us assume that you have your trained (fitted) model in a variable model.
Now in your favorite python environment import pickle and dump the model as a file.


import pickle
with open(r'model.pkl' ,'wb') as f:
  pickle.dump(model, f)

Once you have the pickle file, it is ready for import.

Importing your model

Decisimo will show you for import a screen where you need to define a few things – what python version you are using and which libraries shall be imported.

Next are input variables that will be passed for prediction. Specify them in the order that your model expects them and correctly define data types of the variables your model expects. If the data types do not match, the result will end in failure.

Next, define from which fields within a data object shall be used for your variables. During execution, those values will be converted to predefined data types and then passed to your model for prediction.

Once you hit “save model”, the system will start preparing the environment for it. It may take a minute for it to be finished and ready for use.

Once the model is ready to use, you can test it by passing testing values and seeing whether the model works as expected.