BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
njwmeme
Fluorite | Level 6

Hi,

 

I would like to know How to Predict Categorical Target Variable using Decision Tree. 

 

 

Thank You.

Regards,

Ng Jian Wei

1 ACCEPTED SOLUTION

Accepted Solutions
rayIII
SAS Employee

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)

 

 

 

 

View solution in original post

3 REPLIES 3
rayIII
SAS Employee

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)

 

 

 

 

njwmeme
Fluorite | Level 6

Hi Raylll,

 

Thank you very much! 🙂

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to choose a machine learning algorithm

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.

Discussion stats
  • 3 replies
  • 1930 views
  • 0 likes
  • 2 in conversation