BookmarkSubscribeRSS Feed
juanvg1972
Pyrite | Level 9

Hi,

 

I have a process made in SAS/BASE coding that I want to do now in SAS/EG using workflow.

I have to do a logistic regression. In my below code you can see that I run a logistic regression (training dataset), save the model and after I apply my model with other dataset (validation)

 

proc logistic data=test outmodel=modelo plots=ROC;
class cod_tarifa productos;
model hc_consumo=cod_tarifa productos;
quit;

/*

/* Apply model*/

proc logistic inmodel=modelo;
score data=validar out=validar1;
quit;

 

I am trying to do it with logistic regression task in a workflow. I can select target variable (hc_consumo) and features (cod_tarifa productos), but I don't know how to save the model, and how to apply after hist model, is it possible in a SAS/EG guided task.

 

Any advice will be greatly appreciated

 

Juan

2 REPLIES 2
ChrisHemedinger
Community Manager

Hi Juan,

 

I don't think that the Logistic Regression task supports the SCORE statement.

 

There is this task: Tasks->Data Mining->Model Scoring.  This allows you to run a stored model against another data set, but the model must be registered in a SAS Metadata repository.  (The task is available only if you are connected to a SAS Metadata environment.) That is, you would need to use something like SAS Model Manager or SAS Enterprise Miner to have registered your model from a previous step, then you can select the model to use with your validation data.

 

Otherwise, you would need to do what you're doing: build the model in the Logistic Regression task, but then use a SAS program node to score it.

 

Others who have expertise in data mining might have a better answer.

 

Chris

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
juanvg1972
Pyrite | Level 9

Thanks for your help, Chris

 

I will try model scoring tasks. Previosuly I would like to save the model, is it possible from the Logistic Reg task of SAS/EG.

I think it is not posiible, but I am not sure.

 

Thanks,

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1905 views
  • 0 likes
  • 2 in conversation