The HPREDUCE Procedure
Supervised Variable Selection with HPREDUCE Procedure
The following statements use PROC HPREDUCE for supervised variable selection. The statements specify that y is the response variable, the technique used for variable selection is discriminant analysis, and the maximum number of variables to select is 5.
proc hpreduce data=getstarted technique=DiscriminantAnalysis;
class C y;
reduce supervised y = C x1-x10 / maxeffects=5;
performance details;
run;
The output from this analysis is presented in Figure 7 through Figure 11.
Figure 7 shows the "Performance Information" table, which indicates that the procedure ran locally and that four threads were used.
Figure 7: Performance Information
| Performance Information | |
|---|---|
| Execution Mode | Single-Machine |
| Number of Threads | 16 |
Figure 8 displays the "Model Information" and "Number of Observations" tables. The "Model Information" table shows that HPREDUCE procedure performed supervised variable selection. The CLASS variables are parameterized in the general linear model (GLM) parameterization, which is the default. The total number of variables is 12. The technique used for variable selection is discriminant analysis, and the maximum number of variables to select is 5. The "Number of Observations" table shows that all 100 observations in the data set are used in the analysis.
Figure 8: Model Information and Number of Observations
| Model Information | |
|---|---|
| Data Source | GETSTARTED |
| Model Type | Supervised |
| Class Parameterization | GLM |
| Selection Technique | Discriminant Analysis |
| Number of Variables | 12 |
| Number of Variables to Select | 5 |
| Number of Observations Read | 100 |
|---|---|
| Number of Observations Used | 100 |
Figure 9 shows the "Class Level Information" table, which indicates that the CLASS variable C has 10 unique formatted levels and the CLASS variable y has two levels.
Figure 9: Class Level Information and Response Profile
| Class Level Information | ||
|---|---|---|
| Class | Levels | Values |
| C | 10 | A B C D E F G H I J |
| y | 2 | 0 1 |
Figure 10 shows the "Selection Summary" and "Selected Variable" tables. The "Selection Summary" table shows which variable (or level for CLASS variables) is selected in each step, in addition to the total variance that is explained by the variables selected so far. The "Selected Variable" table presents all the selected variables and their corresponding variable types.
Figure 10: Selection Summary and Selected Variable
| Selection Summary | ||||||||
|---|---|---|---|---|---|---|---|---|
| Iteration | Selected Effect | Level | Proportion of Variance Explained | SSE | MSE | AIC | AICC | BIC |
| 1 | C | J | 0.0811 | 0.9189 | 0.00928 | 0.0154 | 2.0196 | -0.0385 |
| 2 | x8 | - | 0.1323 | 0.8677 | 0.00885 | -0.0019 | 2.0055 | -0.0498 |
| 3 | x2 | - | 0.1687 | 0.8313 | 0.00857 | -0.0048 | 2.0067 | -0.0467 |
| 4 | C | C | 0.1992 | 0.8008 | 0.00834 | -0.0021 | 2.0145 | -0.0379 |
| 5 | x4 | - | 0.2184 | 0.7816 | 0.00823 | 0.0136 | 2.0362 | -0.0161 |
| 6 | x9 | - | 0.2369 | 0.7631 | 0.00812 | 0.0297 | 2.0593 | 0.0060 |
| Selected Variables | ||
|---|---|---|
| Number | Selected Variable | Variable Type |
| 1 | C | CLASS |
| 2 | x8 | INTERVAL |
| 3 | x2 | INTERVAL |
| 4 | x4 | INTERVAL |
| 5 | x9 | INTERVAL |
Figure 11 shows the "Procedure Task Timing" table, which provides details about how much time is used by each processing step.
Figure 11: Procedure Task Timing
| Procedure Task Timing | ||
|---|---|---|
| Task | Seconds | Percent |
| Data Read and Variable levelization | 0.04 | 15.56% |
| Effect Levelization | 0.00 | 0.27% |
| Data Preparation for Discriminant Analysis | 0.00 | 0.00% |
| Cross-product Accumulation | 0.17 | 73.05% |
| Variable Selection | 0.03 | 11.12% |