1
$\begingroup$

I'm having a dataset, where I created a decision tree. My output variables are binary values. I selected two features and the decision tree was generated using R. This is my code.

latlontree = rpart(Medv ~ Crim + Rm, data=housing_data)

Following is my decision tree

enter image description here

Can someone help me to interpret this decision tree with any branch When I changed my code to following the tree changed like below

latlontree = rpart(Medv ~ Crim + Rm, data=housing_data , method = "class")

What is the difference? Is right hand side of the tree corresponding always to No?

$\endgroup$
0
$\begingroup$

Right hand side always correspond to no. It means that thé first split of your tree is :

  • left = observations with Rm < 6.5
  • right = obs. with Rm >= 6.5

The values at the bottom of your trees correspond to leaf, and correspond to the probabilty to be Medv = 1 (for the observations that arrived until this leaf)

$\endgroup$

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.