The HPREDUCE Procedure

Example 9.1 Select Variables

This example first generates a data set, which has 2,000 observations and contains both interval variables (x1x10) and CLASS variables (b1b3, c1c10). Then PROC HPREDUCE is run to select variables.

 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;
 	   if c{1} eq 0 then b1 = 'aa';
 	   if c{1} eq 1 then b1 = 'bb';
 	   if c{1} eq 2 then b1 = 'cc';
 	   if c{1} eq 3 then b1 = 'dd';
 	   if c{1} eq 4 then b1 = 'ee';

 	   if c{2} eq 0 then b2 = 'ff';
 	   if c{2} eq 1 then b2 = 'gg';
 	   if c{2} eq 2 then b2 = 'hh';
 	   if c{2} eq 3 then b2 = 'ii';
 	   if c{2} eq 4 then b2 = 'jj';

 	   if c{3} eq 0 then b3 = 'kk';
 	   if c{3} eq 1 then b3 = 'll';
 	   if c{3} eq 2 then b3 = 'mm';
 	   if c{3} eq 3 then b3 = 'nn';
 	   if c{3} eq 4 then b3 = 'oo';
     output;
   end;
 run;
 ods listing;
 proc hpreduce data=one;
     class b1-b3 c1-c3;
     reduce unsupervised b1 b1*b2 b3 c1-c3 x1-x10/maxsteps=5;
     performance details;
 run;

Output 9.1.1 shows that the PROC HPREDUCE ran locally and that four threads were used.

Output 9.1.1: PROC HPREDUCE Running in Single-Machine Mode

The HPREDUCE Procedure

Performance Information
Execution ModeSingle-Machine
Number of Threads16

Data Access Information
DataEngineRolePath
WORK.ONEV9InputOn Client

Model Information
Data SourceONE
Model TypeUnsupervised
Class ParameterizationGLM
Selection TechniqueVariance Analysis
Number of Variables16
Maximal Number of Steps5

Number of Observations Read2000
Number of Observations Used2000

Class Level Information
ClassLevelsValues
b14aa bb cc dd
b24ff gg hh ii
b34kk ll mm nn
c140 1 2 3
c240 1 2 3
c340 1 2 3

Selection Summary
IterationSelected
Effect
LevelProportion
of
Variance
Explained
SSEMSEAICAICCBIC
1b1cc0.082142.22360.02114.823049.84903.7468
2b1bb0.163738.46940.01934.727948.75383.6575
3b1aa0.244334.76350.01744.623647.64943.5600
4b3kk0.303632.03230.01604.537746.56353.4819
5b3mm0.361929.35190.01474.445445.47103.3984

Selected Variables
NumberSelected
Variable
Variable
Type
1b1CLASS
2b3CLASS

Procedure Task Timing
TaskSecondsPercent
Data Read and Variable levelization0.0313.33%
Effect Levelization0.000.96%
Data Preparation for Discriminant Analysis0.000.00%
Cross-product Accumulation0.1764.82%
Variable Selection0.0520.89%


Last updated: May 25, 2022