BookmarkSubscribeRSS Feed
Mike90
Quartz | Level 8

Suppose you have this categorical target {Pine Trees, Palm Trees, Mountain Laurel, Yew Bush, Angelonia, Marigold} and you want to

convert it to this categorical target: {Trees, Bushes, Annuals},  I don't care about being able to rename the bins, I just want to be able to do this kind binning on the target.

 

I am finding that I am having to do 90% of my transformations outside of SAS, and I constantly go through the process of re-importing my data.  If you know the answer to the above question, please provide a reference, as that reference might be helpful for the other transformations I need.

 

Thanks.

 

SAS Enterprise Miner 14.2

 

3 REPLIES 3
AnujaNagpal
SAS Employee

Hi Mike,

 

You can use "transform variable" node under modify tab of EM to bin your target variable.

Use the Class Targets property to specify the transformation method that you want to use for class target variables.

Group rare levels — transformed using rare levels.

Dummy Indicators — transformed using dummy variables.

None — (default) no transformation is performed

 

You can also use "formulas" from "transform variable" node's property section or code node to build your customized levels. 

 

Mike90
Quartz | Level 8

Thanks for the reply. 

 

Your suggestion doesn't solve my problem

 

>  {Pine Trees, Palm Trees, Mountain Laurel, Yew Bush, Angelonia, Marigold}

> manually binned to:

< {Trees, Bushes, Annuals}, 

 

 

mark11375
SAS Employee

Hi...

 

You could try the Interactive Binning Node, under the Modify tab in Enterprise Miner. There, you can create groups of trees, etc. The variable will be named by Enterprise Miner default methods, but you will see the contents of each group in the scoring code that's produced.

 

Actually, if the variable grouping is constant across multiple projects, you may want to program this in your data preparation program, which you'd run to create your modeling data for Enterprise Miner. I would do this especially if you have many categorical variables to recode.

 

Hope this helps,

Mark

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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
  • 3006 views
  • 0 likes
  • 3 in conversation