Join Keith McCormick for an in-depth discussion in this video Adding a second model with C&RT, part of Machine Learning & AI Foundations: Decision Trees.
- [Instructor] The current model will have similar steps but pay particular attention to how I'm going to organize the two models on the screen. I'm going to bring in my cart modeling node and I'm going to connect this to the partition node. My favorite way to do that is pressing the wheel mouse and dragging out and releasing. Let's edit that modeling node. And we notice that the type node is automatically declared the target and the inputs. That's actually what this setting means, use predefined roles, it means that the type node is in charge and we can run the model.
Here's the step that I cautioned you about. If we keep this organized the way that it is now, the Chaid results will go one way and the Cart results will go another way, and that's actually not what we want. We want to hook those up like train cars, one after the other so that the predictions of both models will go to the same place. It may seem at first, that the cart model benefits in some way from the chaid model but it's literally coming after, but it's really not the case and we can show that with a table node.
So I double clicked on the table node to add that and I'm going to double click again to run it. And lets take a look. So we have all the variables that we started with but the interesting stuff is over here on the right hand side and we see that partition node, variable that was created and we also now have the prediction of the chaid and the confidence of the chaid, the prediction of the cart and confidence of the cart, so it's really just two different predictions. And the reason that I can see the chaid results and the cart results in the same table is because of how I hooked them up on the screen.
So it's really just two different predictions. Now let's find out which model did a better job.
- Using the SPSS Modeler
- Building a CHAID model
- Adding a second model with C&RT
- Analysis notes
- Using a lift and gains chart
- Exploring algorithms
- Building a tree interactively
- The Bonferonni adjustment
- Handling nominal, ordinal, and continuous variables
- Examining the CHAID tree
- The Gini coefficient
- Weighing purity and balance
- Understanding pruning
- Examining the C&RT tree
- Applying stopping rules
- Using the Auto Classifier tuning trick