Hi,
I would like to know How to Predict Categorical Target Variable using Decision Tree.
Thank You.
Regards,
Ng Jian Wei
It's straightforward with Enterprise Miner and you can try this out by using the Fisher-Anderson Iris data, which is provided as a sample dataset:
1. In Help > Generate Sample Data Sources, choose the iris data and press OK.
2. Drag the Iris data onto the canvas.
3 Make sure Species is defined as a nominal target. (Confirm by right clicking on the node and choose Edit Variables...)
4. Connect it to a Decision Tree node and run. You will get a tree whose terminal nodes essentially correspond to different species (setosa, virginica, versicolor).
In actual practice you would normally partition the data into training and validation samples before running the tree. You can use the Data Partition node for that.
You can also look at the HP Tree node for distributed processing.
Hope this helps.
(note: edited for clarity)
It's straightforward with Enterprise Miner and you can try this out by using the Fisher-Anderson Iris data, which is provided as a sample dataset:
1. In Help > Generate Sample Data Sources, choose the iris data and press OK.
2. Drag the Iris data onto the canvas.
3 Make sure Species is defined as a nominal target. (Confirm by right clicking on the node and choose Edit Variables...)
4. Connect it to a Decision Tree node and run. You will get a tree whose terminal nodes essentially correspond to different species (setosa, virginica, versicolor).
In actual practice you would normally partition the data into training and validation samples before running the tree. You can use the Data Partition node for that.
You can also look at the HP Tree node for distributed processing.
Hope this helps.
(note: edited for clarity)
Hi Raylll,
Thank you very much! 🙂
You're welcome!
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.
Find more tutorials on the SAS Users YouTube channel.