Classification TreesGood morning,
I have a small file (see attached file) to better understand what JMP calculates.
The tree is quite small, I set the minimum size of a node to 1, I performed the divisions one by one, I asked for the probabilities to be displayed.
Now, I'm focused on the node "X1>=14" and if I understand correctly:
- The G^2 (3.82) characterizes the impurity of this knot and is independent of the "best" division that comes below it
- Logworth (1.05) is calculated using G^2 displayed right next to it.
- The Logworth depends on the "best" division, which is displayed just below; it is calculated from an adjusted p-value obtained from all possible cuts.
Points 2 and 3 appear to be incompatible.
JMP's learnbot has, for once, stalled, and sees 2 possible but incompatible interpretations.
So, where does this 1.05 come from and how do we interpret it?
Thank you for your response.
Jean-Luc
Predictive Modeling and Machine Learning
Re: Classification TreesHello @rugolf ,
I think there is confusion in the definition and use of the two metrics G2 and Logworth.
As mentioned in the JMP help documentation , the decision tree in JMP uses the Logworth value as the decision criterion for determining where to perform the split (with the goal of maximizing the Logworth value), and this corresponds to -log10(p-value). This p-value is calculated with an adjustment, not detailed in the help documentation, which ensures a fair and equitable calculation between factors with many or few levels.
The G2 is displayed for categorical responses only, and a low G2 indicates a better fit. For continuous responses, the standard deviation is displayed for each node, along with the Candidate SS (sum of squares for the best split).
I hope this answer will shed some light on how this platform works.
Re: Classification TreesTHANKS,
If I understand correctly, in the case of a categorical response with 2 categories A and B:
- The G² measures the impurity of the node (also called deviance): 0 if only A or only B, unbalanced classes but no further division from this node
- the maximum of G^2 (equal to n * 2ln(2) I think) if the classes are balanced (as many A as

- G^2 decreases with each division while R^2 increases; this is going in the right direction, which is what we want.
- We could calculate the improvement (the gain) after a division G^2(parent)-(G^2(left)+G^2(right))
- The best cut is the one that provides the greatest improvement, the one that most significantly reduces the previous G^2 value.
- logworth = -log(p-value) with p-value associated with a test and adjusted (I'll skip the calculation, no big deal)
- The logworth displayed next to G^2 refers to the best division displayed just below it.
- The test is H_0: on the left and right the proportion of A is the same vs ....is not the same
- Extreme case: p-value=1, therefore logworth=0 when there is the same proportion of A (and
in the child nodes, H_0 retained at the end of the test
- In extreme cases: p-value=0, therefore logworth=infinity when the proportion of A is very different in the child nodes, H_1 retained at the end of the test
- p-value <0.01, therefore logworth >2, therefore a significant difference in proportion of A (or
, a significant discernment
- The best cut is therefore also the one with the highest logworthiness.
- The tree stops growing when G^2 is zero, when the minimum size is reached, or when R^2 no longer increases significantly.
Thank you for your help.
Rugolf or Jean-Luc
Re: Classification TreesHello Jean-Luc,
Regarding the different parts:
Hopefully this answer clarifies how the Partition platform works.
Re: Classification TreesHello Victor,
Thank you very much for this generous response.
I see that I'm on the "right" side.
Otherwise, the choice of the small file is intentional: I do this to clearly see what the software calculates, for example, for a simple linear regression. I have other, larger, and more realistic files.
Thank you again.
Best wishes.
Jean-Luc