BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sachinkalra
Obsidian | Level 7

Hi Folks,

 

I have created some features in my data(train) before fitting it to the model using sas code node. I want to ask while scoring test data set do i need to create those features again in score data set ? Or shall i simply connect the scoring data set to score node and connect the model.

 

in R i used to merge test and train do feature engineering and then split them again. Pls suggest whether score node handles this automatically.

1 ACCEPTED SOLUTION

Accepted Solutions
WendyCzika
SAS Employee

Nope you can just put it in the Score Code and it will apply to all your partitions, including Train.

View solution in original post

5 REPLIES 5
WendyCzika
SAS Employee

If your code to create new features is in a single DATA step, then there is an easy way to do this - put your code in the "Score Code" pane of the SAS Code node (see the icons on the left side of the SAS Code node window to switch between the panes) instead of the "Training Code" pane - and you can omit the DATA statement, SET statement, and RUN statement.  So for example, you could just have:

 

   NewVar = OldVar1 + OldVar2;

 

Then that code will automatically be appended to the score code for your whole flow, and applied to all the partitions.

sachinkalra
Obsidian | Level 7

Hi

 

I only have three options in Score Property Pane of SAS code node.

1. advisor type

2. publish code

3. code format

 

I am unable to relate it to what you suggested.

WendyCzika
SAS Employee

This is actually inside the Code Editor, after you've opened it, see screenshot.  When you click on the icon on the left for "Score Code", it will switch the code panel to be "Score Code", and there you can directly enter your DATA step code as in my example above.

 

ScoreCode.PNG

sachinkalra
Obsidian | Level 7

Hi 

 

Thanks for prompt reply. I understand it now.

 

Please address one more query of mine.

So this code which I'll be putting in score code pane will it get applied to "train code" as well ?

 

what I'm trying to establish is that I write a code only once and same runs for raw data set as well as my score data set.

 

right now I have done something like shown in screenshot. have actually written the code two times(copied the code).

 

or what you said will work like i write the code selecting train pane once and then score pane again in same code editor. ?

 

 

Capture.PNG

WendyCzika
SAS Employee

Nope you can just put it in the Score Code and it will apply to all your partitions, including Train.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 5 replies
  • 1112 views
  • 1 like
  • 2 in conversation