Search…
⌃K
Links

Create Simple Decision Tree

This tutorial will walk you through the creation of a simple Decision Tree.

How to create a simple decision tree

Let's advance one step at a time.

1. Log in

Becoming a superhero is a fairly straightforward process. After entering our login page, you will be able to pass your credentials and log in.
There are multiple options for user login. If you do not have an account yet, you can create one. After logging in to the application, the Dashboard will be displayed.

2. Go to Create rule

To display the rule creation pop-up click the
button on the sidebar.

3. Create a New Decision Tree

You will be prompted to provide a name and choose between SAMPLE RULE or EMPTY RULE. For now, name the rule as you wish and choose the EMPTY RULE. The new rule will be created and its detail will be displayed. We will continue in the Rule Settings tab.
In our case, we will choose an empty tree to walk you through the whole process.

4. Create First If Block

Click on create business condition.

5. Specify Condition Inside If Block

1. Click on the first add button inside the if block.
2. Dropdown will be shown.
3. Click on condition.
4. Click on the orange dropdown. Here you will choose an input attribute that will later be evaluated when solving the decision tree.
5. For simplicity sake, the only input attribute is the "Input attribute" created automatically, when choosing the empty decision tree. Click on the "Input attribute".
To learn more about the Input/Output Model, click here​
6. Now click on the empty... text to edit the value.
7. Now type in a value to which we will compare the input once solving the decision tree. Let's write "learning" for example. To save the value either click on the save button or press enter.
8. Now click on the second add button inside the if block.
9. Click on then.
10. Click on add result.
11. Once again, click on the orange button saying "not set" and choose the only Output attribute which was automatically created and is called "Output attribute".
12. Click on the empty... text and fill in the result value as with the if condition.
Great, you now know how to create a simple condition
🎉
.

6. Create Second If Block

To simplify the process, you can click on the settings icon of the first If block and select clone.
This will create an exact copy of the If block down below.
The only thing to do now is to change the values inside the newly created If block.
These two If blocks are very similar to the If and Else If behavior, if you are familiar with programming concepts.

7. Create Else Block

Finally we create an Else block. The Else block will be executed whenever none of the above If blocks evaluate to true. In our case, if the Input Attribute is anything else than the value "learning" and "procrastinating".
​
Now click on the
button under the Else If block and add another Else block.
Now inside the last Else block simply add Then block and fill it out with whatever value you like.

8. Test It!

Simply click on the test bench in the bottom bar
.
Type "learning" in the Input Property and click on
.
You can see that the first block was evaluated.
Inputting the word "procrastinating" will return "mission failed".
Finally inputting anything else than these two word will return "unexpected output".
More information can be found here.
​