Building models with SAS Enterprise Miner, SAS Factory Miner, SAS Visual Data Mining and Machine Learning or just with programming

using neural nets

Reply
Contributor
Posts: 21

using neural nets

here is some code I ran which is confusing to me based on the log errors. yet age is on the dataset

 


4234  proc neural data=lib2.devcorrallvar_mar30
4235  dmdbcat=lib2.devcorrallvar_mar30
4236  random=789;
4237      input  age joingrouptenure/ level=interval id=memberno1;
ERROR: The data LIB2.DEVCORRALLVAR_MAR30 does not contain the variable age.
The node memberno1 is flagged as a bad node.
4238   target response / id=o level=nominal;
4239
4240       hidden 3 / id=h;
4241       prelim 5;
ERROR: Cannot construct the network.
ERROR: Cannot train this network.
4242
4243         train;
ERROR: Cannot construct the network.
ERROR: Cannot train this network.
4244
4245         score out=out outfit=fit;
ERROR: The weights and the network have not yet been initialized.
4246      score data= lib2.valcorrallvar_mar30   out=gridout;   title 'MLP with 3 Hidden Units';
ERROR: The weights and the network have not yet been initialized.
4246!  run;

 

here is a proc print of that dataset which contains age.

 

                                Obs    AGE    JOINGROUPTENURE

                                    1     0            0
                                    2     0            0
                                    3     0            0
                                    4     0            0
                                    5     0            0
                                    6     0            0
                                    7     0            0
                                    8     0            0
                                    9     0            0
                                   10     0            0

 

 

  

SAS Super FREQ
Posts: 306

Re: using neural nets

You need to run PROC DMDB to create the input data set and catalog for PROC NEURAL (sorry this step was omitted in the post that I included in your other post).  Here is an example:

 

*** CREATE DATA MINING DATABASE WITH PROC DMDB - REQUIRED FOR PROC NEURAL;
proc dmdb data=lib2.devcorrallvar_mar30 out=dmdbout_dca_mar30 dmdbcat=dmdbcat_dca_mar30;
var age joingrouptenure;

class response;
target response;
run;

*** RUN PROC NEURAL;
proc neural data=dmdbout_dca_mar30 dmdbcat=dmdbcat_dca_mar30 ...;

*** the rest of your code below... ;

Contributor
Posts: 21

Re: using neural nets and now HPNEURAL

Posted in reply to WendyCzika

that's great for neural nets which now works but am now trying HPNEURAL

because we can have training and testing through the partition statements and train statements.See below code

 

 

proc hpneural data=lib2.devcorrallvar_mar30;
input age joingrouptenure  PAYCASHDRAWEROTHR
LTVGROUPDESC1
TENURE
etc;
target response/ level=nom;
hidden 2;
partition fraction (train=0.6);
train outmodel=model_assoc maxiter=1000;
run;

 

Above code is fine. Now I try running the scoring code on a validation

 


proc hpneural data=valid;
score model=model_assoc out=valid1 ; run;

run;

 

Here is my output:

 

                                       The MEANS Procedure

  Variable     Label                      N          Mean       Std Dev       Minimum       Maximum
  ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
  P_response0  Predicted: response=0  25300     0.9447408     0.0310369     0.8167701     0.9708281
  P_response1  Predicted: response=1  25300     0.0552592     0.0310369     0.0291719     0.1832299
  ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ

There is no variable for the actual observed behaviour of response in VALID1. Can you please advise and by the way thanks for your support.

 

 

 

SAS Super FREQ
Posts: 306

Re: using neural nets and now HPNEURAL

If I'm understanding your issue correctly, I think you just need to add an ID statement to PROC HPNEURAL to list the variables you want to keep in the OUT= data set (response, e,g,).

 

Ask a Question
Discussion stats
  • 3 replies
  • 237 views
  • 0 likes
  • 2 in conversation