machine learning model results categorization

How to categorize Machine Learning model scoring results

You already have a Machine Learning model, in addition, you created the running scenario all by yourself in just a few minutes. So… let’s take it to the next level. What will you do to categorize customers based on performance?

P.S. If you are looking for a quick, easy, and effective way to deploy your ML model, look here – we have described the whole process step by step 🙂

Adding variables to a scoring scenario

If you haven’t used our MLOps engine yet, you will gain access to the free version here. You can easily check out the documentation as well.

If you would like to try to categorize the scoring results with us, download the simple .py script we’ve prepared for you – we’ll be working on it today. Let’s start!

Add Expression

Open Scoring.One, go back to the scenario creation and add another item. Before the “End” tile, place the “Expressions” tile (drag it from the left to the scenario box) – this is where you can enter code in Python, R, or Groovy. The variables created here will be returned by the model along with the results.

Expression Code

Expression Settings

End Settings

Categorization of the Machine Learning model results

When the variable “category” has been added by you, along with the final scoring score, you will also receive the category into which its value falls.

scoring results form

It’s time for an http query. Use any (http) client for this purpose. We will use the requests library for Python as an example.

In the space provided for entering the URL, insert:

How do you find the user key? It is hidden under the “Score Token”.

Scoring scenario user settings

Now, enter the variables necessary in the model as the Body of the query. Below is an example of how to set all the necessary information during a query.

API parameters

Run the script. A json with the query results will be returned. And that’s it, job well done!


As you can see, Machine Learning analytics-based operations present challenges when you use the right tools to do so. If you are looking for help with advanced questions, you can find our experts at Go ahead and leave a message 🙂

Pin It on Pinterest