Resources

SASŪ High-Performance Analytics Samples

The SAS High-Performance Analytics sample programs and install verification tests can be run only after you edit and submit this file. The file contains site-specific information about your environment so that the procedures can run successfully.

Example 2 for PROC HPREDUCE

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: hpred02.sas                                         */
/*   TITLE: Example 2 for PROC HPREDUCE                         */
/*          Supervised variable selection in distributed mode   */
/* PRODUCT: HPA                                                 */
/*  SYSTEM: ALL                                                 */
/*    KEYS: Variable Selection,                                 */
/*          Distributed Mode,                                   */
/*          Supervised                                          */
/*   PROCS: HPREDUCE                                            */
/*    DATA:                                                     */
/*                                                              */
/* SUPPORT: Z. Alan Zhao                                        */
/*     REF: SAS/HPA User's Guide, PROC HPREDUCE chapter         */
/*    MISC:                                                     */
/*                                                              */
/****************************************************************/

option set=GRIDHOST="&GRIDHOST";
option set=GRIDINSTALLLOC="&GRIDINSTALLLOC";

data one;
  array x{10};
  array c{10};
  do i=1 to 2000;
    do j=1 to 10;
       x{j}=ranuni(1);
       c{j}=int(ranuni(1)*4);
    end;
    y=int(ranuni(1)*2);
    output;
  end;
run;

title  "HPREDUCE on Grid";

proc hpreduce data=one tech=var;
       class c1 c2 c3;
       reduce supervised y = c1-c3 x1-x10/maxsteps=5;
       PERFORMANCE nodes=2;
run;