Published on :
Statistical CREATION_INTERNE

Documentation Example 5 for PROC HPSPLIT

This code is also available in: Deutsch Español Français
Awaiting validation
This script illustrates the use of the HPSPLIT procedure, a high-performance statistical procedure. It begins by creating a data set named 'MBE_Data' containing information about experiments. Then, it applies a classification tree model to predict the 'Usable' variable based on other variables. The maximum tree depth is set to 6 and no pruning is applied, meaning the tree will be fully grown up to this depth.
Data Analysis

Type : CREATION_INTERNE


The data is created directly within the script via a DATA step and the 'datalines' statement. It does not come from SASHELP or an external file.

1 Code Block
DATA STEP Data
Explanation :
This block is a DATA step that creates the 'MBE_Data' table. It defines five variables with their labels, then reads 20 observations directly from the code using the 'datalines' statement. The data is stored in the default WORK library.
Copied!
1DATA MBE_Data;
2 label gTemp = 'Growth Temperature of Substrate';
3 label aTemp = 'Anneal Temperature';
4 label Rot = 'Rotation Speed';
5 label Dopant = 'Dopant Atom';
6 label Usable = 'Experiment Could Be Performed';
7 
8 INPUT gTemp aTemp Rot Dopant $ 39-40 Usable $ 47-54;
9 DATALINES;
10 384.614 633.172 1.01933 C Unusable
11 363.874 512.942 0.72057 C Unusable
12 397.395 671.179 0.90419 C Unusable
13 389.962 653.940 1.01417 C Unusable
14 387.763 612.545 1.00417 C Unusable
15 394.206 617.021 1.07188 Si Usable
16 387.135 616.035 0.94740 Si Usable
17 428.783 745.345 0.99087 Si Unusable
18 399.365 600.932 1.23307 Si Unusable
19 455.502 648.821 1.01703 Si Unusable
20 387.362 697.589 1.01623 Ge Usable
21 408.872 640.406 0.94543 Ge Usable
22 407.734 628.196 1.05137 Ge Usable
23 417.343 612.328 1.03960 Ge Usable
24 482.539 669.392 0.84249 Ge Unusable
25 367.116 564.246 0.99642 Sn Unusable
26 398.594 733.839 1.08744 Sn Unusable
27 378.032 619.561 1.06137 Sn Usable
28 357.544 606.871 0.85205 Sn Unusable
29 384.578 635.858 1.12215 Sn Unusable
30 ;
31RUN;
2 Code Block
PROC HPSPLIT
Explanation :
This block executes the HPSPLIT procedure to build a classification tree. The 'data=MBE_Data' option specifies the input table. 'maxdepth=6' limits the tree's depth to 6 levels. The 'class' statement declares 'Usable' and 'Dopant' as categorical variables. 'model' defines 'Usable' as the target variable to be predicted by the other variables. 'prune none' instructs the procedure not to prune the tree, maintaining its complete structure up to the specified maximum depth.
Copied!
1PROC HPSPLIT DATA=MBE_Data maxdepth=6;
2 class Usable Dopant;
3 model Usable = gTemp aTemp Rot Dopant;
4 prune none;
5RUN;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
Copyright Info : S A S S A M P L E L I B R A R Y