0
$\begingroup$

Is there any signification in the height of the split in a tree when it's plotted with R ?

Example:

library(rpart)
plot(tree)

How can we interpret the fact than the blue split is bigger than the red one? enter image description here

$\endgroup$
2
  • $\begingroup$ It is probably the diminution of the mean square error. A long height indicate a bigger diminution. $\endgroup$ May 5 '15 at 15:41
  • $\begingroup$ The first split is not supposed to be more important than the 2nd and so on ? $\endgroup$
    – psql
    May 5 '15 at 15:50
2
$\begingroup$

It's quite murky but the documentation has the answer.

Applies only when uniform=FALSE. Default .3. The minimum height between levels is clamped at minbranch times the mean interlevel distance. Needed because sometimes a split gives little or no improvement in deviance, and an interlevel distance strictly proportional to the improvement would leave no room for the label.

rpart.plot

Note : these heights can all be adjust and changed - it's just defaulting to this.

$\endgroup$
1
  • $\begingroup$ Ok so the blue one should be smaller than the red one but it would not allow to see the labels if it was proportional ? $\endgroup$
    – psql
    May 5 '15 at 16:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.