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


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.

  • $\begingroup$ 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) $\endgroup$ May 29 '18 at 14:37
  • 1
    $\begingroup$ 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) $\endgroup$ May 29 '18 at 15:16
  • $\begingroup$ 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. $\endgroup$
    – user9947
    May 29 '18 at 16:44

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.