Generates DATA step scoring code from a gradient boosting tree model.
| Parameter | Description |
|---|---|
| code | Requests that the action produce SAS score code. Specify additional parameters such as 'casOut' to save the code to a table. |
| encodeName | Specifies whether to encode the variable names such as predicted probabilities of a binary or nominal target in the generated casout table. The predicted probabilities are named with the prefix P_ instead of _DT_P_. |
| modelTable | Specifies the table containing the model to be used for generating the score code. |
Loads the HMEQ dataset into the active CAS session to be used for training a gradient boosting model.
| 1 | PROC CAS; |
| 2 | SESSION casauto; |
| 3 | TABLE.loadTable / caslib="samples" path="hmeq.csv" casout="hmeq"; |
| 4 | RUN; |
Trains a gradient boosting tree model on the HMEQ data and then generates the SAS DATA step score code to the log.
| 1 | PROC CAS; |
| 2 | decisionTree.gbtreeTrain / |
| 3 | TABLE="hmeq" |
| 4 | target="BAD" |
| 5 | inputs={"LOAN", "MORTDUE", "VALUE", "REASON", "JOB", "YOJ", "DEROG", "DELINQ", "CLAGE", "NINQ", "CLNO", "DEBTINC"} |
| 6 | model={name="gb_model"}; |
| 7 | decisionTree.gbtreeCode / |
| 8 | modelTable="gb_model"; |
| 9 | RUN; |
Generates the SAS score code from the trained model and saves it directly to a CAS table named 'score_code' using the 'code' parameter options.
| 1 | PROC CAS; |
| 2 | decisionTree.gbtreeCode / |
| 3 | modelTable="gb_model" |
| 4 | code={casOut={name="score_code", replace=true}}; |
| 5 | RUN; |