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

I have created 2 models, 1 to predict Response, and 1 to predict Demand - I want my final score to be the cross of the 2 (predicted resp * predicted demand)   I have done this in SAS Code, however, in my new position, I have been asked to use Enterprise Miner -and I have zero experience.  I have managed to follow a few of the tutorials, and use my past experience to get to the point I want with the Models, just don't know how to implement.

 

Thanks for any guideance

Tammy

1 ACCEPTED SOLUTION

Accepted Solutions
JasonXin
SAS Employee
Hi, 1. Your single order model vs multiple order model are just segmentation. If you know how to do one, you should be able to work out the other. 2. When your third model is labeled as resp=1, I understand you want to build the demand/linear reg only on those who have responded and have legit $ order amount. That makes sense. But your label suggests it is a logistic regression. It probably should be a liner Reg. So now you should have one linear demand for those who only responded and had one order. Another demand model for the group that have responded and have >1 orders. In other words, you should have two logistic model *demand. You can connect Model Comparison node to each of the three models you displayed in your screen print, to easily assess model performance. BUT, the Model Comparison node is normally used to compare when the model universe is the same/held fixed. For example, for the same 1 order universe, you like to compare decision tree model, with logistic regression model, you use Model Comparison Node. You should NOT use MC node to compare a model built on 1 order universe and another built on multiple orders. To access Score code, click on the logistic regression node of your interest, right mouse click. In the resulting drop down menu, select Results. On the pop up dialog screen, go to up left corner, see View menu? You should see Score code from there.

View solution in original post

5 REPLIES 5
JasonXin
SAS Employee
Hi, In EM, there are two kinds of ways you can replicate what you did in SAS Code (I imagine that might be BASE +STAT/R). One way is EM's built in node Two-Stage Node. Since you are just starting with EM, I would suggest leave this node alone for now since it has quite a bit built facility that takes a bit time to get used to, although it does conceptually matches what you want. The other way is to just use Regression node to try to replicate your demand model. You can use the same Reg node to replicate the response model. In EM, you set the Target variable type to be binary. Reg node will fit classification model for you. If you set it as interval target, it will fit a linear regression for you. It is decided automatically. Once you finish the two models, go fetch automatically generated SAS Code for scoring, one piece for each model. They are created by each node respectively. They you copy them together. Sound like you are well versed in SAS code. You can cross the two model scores and get your probability adjusted demand. Hope this helps? Thanks for using SAS. Jason Xin
TMiles
Quartz | Level 8

Thank you for responding -I'm still confused on how to do what you suggest.  I am attaching a screen print of what the diagram looks like.  I want to conditionally generate the Resp Model, then create a Demand model.   So each ID will have 2 scores that I will ultimately multiply for a final score and ranking.

 

Would I do the Compare Model 3 times?  How do I get the Score Code?  Sorry for all the questions, , my deadline is close and i feel like I am spinning my wheels.

 

 


EM Diagram.PNG
JasonXin
SAS Employee
Hi, 1. Your single order model vs multiple order model are just segmentation. If you know how to do one, you should be able to work out the other. 2. When your third model is labeled as resp=1, I understand you want to build the demand/linear reg only on those who have responded and have legit $ order amount. That makes sense. But your label suggests it is a logistic regression. It probably should be a liner Reg. So now you should have one linear demand for those who only responded and had one order. Another demand model for the group that have responded and have >1 orders. In other words, you should have two logistic model *demand. You can connect Model Comparison node to each of the three models you displayed in your screen print, to easily assess model performance. BUT, the Model Comparison node is normally used to compare when the model universe is the same/held fixed. For example, for the same 1 order universe, you like to compare decision tree model, with logistic regression model, you use Model Comparison Node. You should NOT use MC node to compare a model built on 1 order universe and another built on multiple orders. To access Score code, click on the logistic regression node of your interest, right mouse click. In the resulting drop down menu, select Results. On the pop up dialog screen, go to up left corner, see View menu? You should see Score code from there.
TMiles
Quartz | Level 8

Thank you -I have gotton that far so do I just add a SAS Code Node and paste in the code and the add the logic to create the Cross of of the 2 scores for each segment (1-time purchasers vs Multi)?  That almost sounds to simple...

JasonXin
SAS Employee
I am glad you are making progress. The point of having GUI system like EM is to free modelers from activities like writing score code to focus on building predictive assets, design, testing and communications. That is how your core competency is supposed to be used. Thanks. Jason Xin

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!

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
  • 1068 views
  • 1 like
  • 2 in conversation