Reputation: 47
I have graphed an h2o decision tree:
I was following a lot of posts on SO and correct me if I'm wrong, but the values at the leaves are correlations, the levels are the count of categorical values, and tree 0 means that first tree that was created.
Now my problem is that
1. I can't figure out the "greater or equal" signs and the "smaller than" signs at the categorical values. For example, if we continue after Z<10.032598
, we have "greater or equal" sign on the right which implies what? Also, we have a "smaller than" sign on the left with NA
which are the categorical variables but what does "smaller than" a categorical variable even means?
2. If we start at the top (c
) and go right, we have the value 1, which I understand imply that c
has 1 correlation. But if we go down 1 level to again Z<10.032598
, the "greater than or equal" sign on the right imply 1 correlation again. What does that mean?
Upvotes: 0
Views: 317
Reputation: 2104
If you are constructing a simple decision tree, then the values at leaf nodes are the output probability, not correlation and the levels are not count of categorical values as you can have multiple features repeating in the tree at different levels. The levels are decided by the depth you provide when training the model.
The greater than or smaller than sign shows which direction you have to go to. For example at level 1, if z>10.0325
than you go right but if it is smaller than you go left in the tree. NA
basically shows that you go left if value is smaller than threshold or is null. Your model is considering categorical variables at numerical and H2O provides you the option to change that using categorical_encoding
. Since the data is in numerical format, it is interpreted as numerical.
The reason there is decision 1
again is because your model is checking a different feature now to verify the results. If first level fails and model is not sure about output, it will check second level and do the same thing and will go further down the tree till it reaches a prediction.
Upvotes: 1