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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1950 views
  • 0 likes
  • 2 in conversation