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! 🙂

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 2048 views
  • 0 likes
  • 2 in conversation