2

This is more of a technical question rather than a practical one.

I've exported a decision tree made with python/scikit learn and would like to know what the "value" field of each leaf corresponds to.

decision tree

nbro
  • 39,006
  • 12
  • 98
  • 176

1 Answers1

4

Decision tree nodes are split bases on the number of data samples, these numbers indicate the number of data samples they are fit to. In your case samples = 256. It is further split into two nodes of 154 and 102.

  • Thanks! And in the case of a Decision Tree Regressor what does that value mean? (on the same tree, from left to right I have 0, 1, 0, 0.44, 0.12) – Jessica Chambers May 29 '18 at 14:37
  • 1
    that is the value you would obtain after regression from the tree, you can check this by running clf.predict() on the respective value to get the values 0, 1, 0, 0.44, 0.12 (assuming clf is the decision tree built) – thecomplexitytheorist May 29 '18 at 15:16
  • Welcome to ai.se...Ihave been going through all your recent answers as the community expects me to...most of your answers have small formatting errors, too trivial to be corrected by some admin or me...so I suggest you correct those errors for a better looking answer, I somewhat did this one for you. –  May 29 '18 at 16:44