Hi all,
I am new at SAS Enterprise Miner 14.1.
I would like to do a replacement of values for a variable of the value of another value is 0.
E.g.
Car Ownership (Binary)
Car Value (Interval)
I would like to clear the Car Value value for all rows that Car Ownership = 0.
Thank you.
Regards,
Zhi Wei
Hello Zhi Wei -
By "clear the value", it sounds like you mean that you want to replace car values of 0 with a missing value.
One approach is to connect a SAS Code node to your flow, and write code to perform the replacement. Select the Code Editor property of the SAS Code node, and try code like this (let car_value be the variable name that corresponds to 'car value'):
data &em_export_train;
set &EM_IMPORT_DATA;
if car_value=0 then car_value=.;
run;
After the SAS Code node, continue your modeling flow.
Some customers prefer to perform re-coding in the ETL process that prepares the SAS data set before it is used in Enterprise Miner, rather than performing the re-coding in Enterprise Miner. Use whichever approach you prefer.
Have a good week!
Hello Zhi Wei -
By "clear the value", it sounds like you mean that you want to replace car values of 0 with a missing value.
One approach is to connect a SAS Code node to your flow, and write code to perform the replacement. Select the Code Editor property of the SAS Code node, and try code like this (let car_value be the variable name that corresponds to 'car value'):
data &em_export_train;
set &EM_IMPORT_DATA;
if car_value=0 then car_value=.;
run;
After the SAS Code node, continue your modeling flow.
Some customers prefer to perform re-coding in the ETL process that prepares the SAS data set before it is used in Enterprise Miner, rather than performing the re-coding in Enterprise Miner. Use whichever approach you prefer.
Have a good week!
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.