SVMACHINE Procedure

Example 39.4 Coordinate Descent Method

In this example, you can apply the same German credit benchmark data that are specified in the section Getting Started: SVMACHINE Procedure. Instead of using the default interior point method, you can apply the coordinate descent method and save the model to an analytic store. After that, you can load the testing data set sampsio.dmagescr into your CAS session and apply the model to the testing data by using the ASTORE procedure.

You can load the sampsio.dmagecr data set into your CAS session as described in the section Getting Started: SVMACHINE Procedure.

The following statements execute the SVM coordinate descent algorithm on the mylib.dmagecr data table and save the training model as mylib.dmageModel. The generated results are listed in Output 39.4.1 through Output 39.4.3.

proc svmachine data=mylib.dmagecr
         method=CD regL1=1.0;
   input checking history purpose savings employed marital coapp
         property other job housing telephon foreign/level=nominal;
   input duration amount installp resident existcr depends age/level=interval;
   target good_bad;
   savestate rstore=mylib.dmageModel;
run;

The procedure option METHOD=CD defines the training algorithm as coordinate descent. The option REGL1=1.0 specifies that the L1 penalty value is used. The SAVESTATE statement shows that the trained model is saved as mylib.dmageModel.

The "Model Information" table is displayed in Output 39.4.1. From this table, you can see that the optimization technique is coordinate descent and the penalty method is "regL1," as well as other parameter settings.

Output 39.4.1: German Credit Model Information

The SVMACHINE Procedure

Model Information
Task TypeC_CLAS
Optimization TechniqueCoordinate Descent
ScaleYES
Kernel FunctionLinear
Penalty MethodregL1
Penalty Parameter1
Maximum Iterations100
Tolerance1e-06
Seed1


The "Misclassification Matrix" table in Output 39.4.2 shows that among the total of 1,000 observations, 700 observations are classified as good and 300 observations are classified as bad. The number of correctly predicted good observations is 603, and the number of correctly predicted bad observations is 180. Thus the accuracy is 78.30%, as indicated in the "Fit Statistics" table in Output 39.4.3.

Output 39.4.2: German Credit Misclassification Matrix

Misclassification Matrix
ObservedTraining Prediction
goodbadTotal
good60397700
bad120180300
Total7232771000


Output 39.4.3: German Credit Accuracy

Fit Statistics
StatisticTraining
Accuracy0.7830
Error0.2170
Sensitivity0.8614
Specificity0.6000


Now you can load the data set sampsio.dmagescr into the CAS session and apply the model mylib.dmageModel by using the ASTORE procedure to generate the score results:

data mylib.dmagescr;
   set sampsio.dmagescr;
run;
proc astore;
    score data=mylib.dmagescr out=mylib.dmagescore
            rstore=mylib.dmageModel copyvar=(CUSTID);
run;
quit;
proc print data=mylib.dmagescore(obs=10);
run;

Output 39.4.4 displays 10 observations from the data table mylib.dmagescore.

Output 39.4.4: German Credit Score Results

Obs_P_P_good_badgoodP_good_badbadI_good_bad_WARN_CUSTID
10.279410.439250.56075bad 649
2-1.710000.709800.29020good 858
3-2.057620.752450.24755good 212
4-2.376120.791530.20847good 166
5-1.033430.626790.37321good 563
6-1.730220.712280.28772good 454
7-0.153400.518820.48118good 938
8-0.899110.610310.38969good 120
91.321330.212720.78728bad 375
10-0.350750.543030.45697good 970


Last updated: August 06, 2026