BookmarkSubscribeRSS Feed
lucaruzzola
Calcite | Level 5

Hi, I am trying to score a trained model on a score dataset in SAS EM, unfortunately the dataset that I must use to score, without being able to edit it, doesn't have a header with variable names, and SAS EM assigns VAR1 to VAR5 names to them.

How can I change them so that they match the variable names used in training the model?

I tried with Transform variables, but it didn't work with score datasets and I wasn't able to find an option.

 

Thanks in advance for the help!

1 REPLY 1
Reeza
Super User

@lucaruzzola wrote:

 unfortunately the dataset that I must use to score, without being able to edit it, doesn't have a header with variable names, and SAS EM assigns VAR1 to VAR5 names to them.

 


What do you mean you can't edit it? If you can't edit it, it usually means you can't change the names?

Otherwise, how are you importing it into EM? That's usually the stage to fix it at...with 5 variables it's probably just as easy to rename it then GUI interface, otherwise the easiest method is to read it in and use a code block to rename the variables. 

 

data _em_2b_scored;
set imported_data;

rename var1=ID var2=age var3=sex var4=amount var5=random;
run;

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 1 reply
  • 1076 views
  • 0 likes
  • 2 in conversation