libname example sasiola host="grid001.example.com" port=10010 tag='hps'; %let base = http://archive.ics.uci.edu/ml/machine-learning-databases; data spambase; infile "&base/spambase/spambase.data" device=url dsd dlm=','; input Make Address All _3d Our Over Remove Internet Order Mail Receive Will People Report Addresses Free Business Email You Credit Your Font _000 Money Hp Hpl George _650 Lab Labs Telnet _857 Data _415 _85 Technology _1999 Parts Pm Direct Cs Meeting Original Project Re Edu Table Conference Semicol Paren Bracket Bang Dollar Pound Cap_Avg Cap_Long Cap_Total Class; run; data example.spambase; set spambase; part = ranuni(12345); run; proc imstat data=example.spambase; 1 where part <= .75; neural class / seed=12345 input=(make--cap_total) nominal=(class) hidden=(10) act=(logistic) numtries=5 maxiter=50 tech=congra maxfunc=2147483647 fconv=1e-4 lower=-20 upper=20 temptable /* details */; 2 run; neural class / seed=12345 3 resume lasrann=example.&_templast_ input=(make--cap_total) nominal=class hidden=(10) act=(logistic) tech=congra maxiter=50 maxfunc=2147483647 fconv=1e-4 lower=-20 upper=20 temptable /* details */; run; where part > .75; neural class / lasrann=example.&_templast_ input=(make--cap_total) nominal=class temptable assess 4 vars=(class); run; table example.&_templast_; where strip(_NN_Level_) eq '1'; assess _NN_P_ / y=class event='1' 5 nbins=20 step=0.05; ods output liftinfo=work.liftdata; ods output rocinfo=work.rocdata; quit; proc sgplot data=work.liftdata; 6 title 'Lift Chart'; series x=depth y=Cumlift / markers markerattrs=(symbol=circlefilled); series x=depth y=CumliftBest; yaxis label=' ' grid; run; data work.endpoint; 7 sensitivity=0; specificity=1; run; data work.rocdata1; set work.rocdata work.endpoint; one_minus_specificity=1-specificity; run; proc sort data=work.rocdata1; by one_minus_specificity; run; /* Plot ROC curve */ ods graphics on / width=480px height=480px; proc sgplot data=work.rocdata1; 8 title 'ROC Curve'; series x=one_minus_specificity y=sensitivity / lineattrs=(color=blue); series x=one_minus_specificity y=one_minus_specificity / lineattrs=(color=black); yaxis grid; quit;