So, here for example, there's a split that says petal.length is less
than 2.45, and if that happens then you in that case all of the
examples that have pedal length less than 2.45 belong to this bc setosa.
So, you can read those model splits to
tell you, what the classification tree is doing.
You can also make a plot of the classification tree.
And so if you just, plot the final model that's produce what
it will do is it will produce what's called a dandergram, like this.
And so it's a little hard to read, it's cut
off here, but you can see petal length less than 2.45.
Then you're assigned a setosa.
And so you can follow to the left what happens if the petal length is
less than 2.45, and to the right what
happens if petal length isn't less than 2.45.
And then follow the next split here at this node
down to the, see the total classification for any particular example.
A prettier version of that plot can be made with the rattle package.
So, you use the function fancyRpartPlot, and you pass
it the final model that was fit using caret.
And it makes again dentigram, but now it's a
little bit easier to see, so here we see.
That if the petal length is less than 2.5, we move over here to the
left, and if it's greater than 2.5 then we go over here to the right.
And then, within that split, so once you've already made that
decision about those samples, and if the petal length is less
that 4.8 you go down here to the left, and if
the petal length is greater you go over here to the right.
And so this makes it a little bit easier to see what's going on.