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 4 for PROC HPREDUCE

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: hpred04.sas                                         */
/*   TITLE: Example 4 for PROC HPREDUCE                         */
/*          Unsupervised variable selection                     */
/*          Output correlation matrix                           */
/*          Correlation matrix in LIL format                    */
/* PRODUCT: HPA                                                 */
/*  SYSTEM: ALL                                                 */
/*    KEYS: Variable Selection,                                 */
/*          Unsupervised                                        */
/*          Correlation matrix                                  */
/*          LIL format                                          */
/*   PROCS: HPREDUCE                                            */
/*    DATA:                                                     */
/*                                                              */
/* SUPPORT: Z. Alan Zhao                                        */
/*     REF: SAS/HPA User's Guide, PROC HPREDUCE chapter         */
/*    MISC:                                                     */
/*                                                              */
/****************************************************************/

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

title  "Output the Correlation Matrix in LIL format";

proc hpreduce data=one corr outcp=corr_lil/list(eps=0.01);
       class a;
       reduce unsupervised a x1-x2 /maxsteps=4;
run;

proc print data=corr_lil;
run;