Example 25.5: Quadratic Discriminant Analysis of Remote-Sensing Data on Crops
In this example, PROC DISCRIM uses normal-theory methods
(METHOD=NORMAL) assuming unequal variances (POOL=NO)
for the remote-sensing data of Example 25.4.
The PRIORS statement, PRIORS PROP, sets the prior
probabilities proportional to the sample sizes.
The CROSSVALIDATE option displays
cross validation error-rate estimates.
Note that the total error count estimate by
cross validation (0.5556) is much larger than the
total error count estimate by resubstitution (0.1111).
The following statements produce Output 25.5.1:
proc discrim data=crops
method=normal pool=no
crossvalidate;
class Crop;
priors prop;
id xvalues;
var x1-x4;
title2 'Using Quadratic Discriminant Function';
run;
Output 25.5.1: Quadratic Discriminant Function on Crop Data
|
| Discriminant Analysis of Remote Sensing Data on Five Crops |
| Using Quadratic Discriminant Function |
| Observations |
36 |
DF Total |
35 |
| Variables |
4 |
DF Within Classes |
31 |
| Classes |
5 |
DF Between Classes |
4 |
| Class Level Information |
| Crop |
Variable Name |
Frequency |
Weight |
Proportion |
Prior Probability |
| Clover |
Clover |
11 |
11.0000 |
0.305556 |
0.305556 |
| Corn |
Corn |
7 |
7.0000 |
0.194444 |
0.194444 |
| Cotton |
Cotton |
6 |
6.0000 |
0.166667 |
0.166667 |
| Soybeans |
Soybeans |
6 |
6.0000 |
0.166667 |
0.166667 |
| Sugarbeets |
Sugarbeets |
6 |
6.0000 |
0.166667 |
0.166667 |
|
|
| Discriminant Analysis of Remote Sensing Data on Five Crops |
| Using Quadratic Discriminant Function |
| Within Covariance Matrix Information |
| Crop |
Covariance Matrix Rank |
Natural Log of the Determinant of the Covariance Matrix |
| Clover |
4 |
23.64618 |
| Corn |
4 |
11.13472 |
| Cotton |
4 |
13.23569 |
| Soybeans |
4 |
12.45263 |
| Sugarbeets |
4 |
17.76293 |
|
|
| Discriminant Analysis of Remote Sensing Data on Five Crops |
| Using Quadratic Discriminant Function |
| Generalized Squared Distance to Crop |
| From Crop |
Clover |
Corn |
Cotton |
Soybeans |
Sugarbeets |
| Clover |
26.01743 |
1320 |
104.18297 |
194.10546 |
31.40816 |
| Corn |
27.73809 |
14.40994 |
150.50763 |
38.36252 |
25.55421 |
| Cotton |
26.38544 |
588.86232 |
16.81921 |
52.03266 |
37.15560 |
| Soybeans |
27.07134 |
46.42131 |
41.01631 |
16.03615 |
23.15920 |
| Sugarbeets |
26.80188 |
332.11563 |
43.98280 |
107.95676 |
21.34645 |
|
|
| Discriminant Analysis of Remote Sensing Data on Five Crops |
| Using Quadratic Discriminant Function |
| The DISCRIM Procedure |
| Classification Summary for Calibration Data: WORK.CROPS |
| Resubstitution Summary using Quadratic Discriminant Function |
| Number of Observations and Percent Classified into Crop |
| From Crop |
Clover |
Corn |
Cotton |
Soybeans |
Sugarbeets |
Total |
| Clover |
9
81.82 |
0
0.00 |
0
0.00 |
0
0.00 |
2
18.18 |
11
100.00 |
| Corn |
0
0.00 |
7
100.00 |
0
0.00 |
0
0.00 |
0
0.00 |
7
100.00 |
| Cotton |
0
0.00 |
0
0.00 |
6
100.00 |
0
0.00 |
0
0.00 |
6
100.00 |
| Soybeans |
0
0.00 |
0
0.00 |
0
0.00 |
6
100.00 |
0
0.00 |
6
100.00 |
| Sugarbeets |
0
0.00 |
0
0.00 |
1
16.67 |
1
16.67 |
4
66.67 |
6
100.00 |
| Total |
9
25.00 |
7
19.44 |
7
19.44 |
7
19.44 |
6
16.67 |
36
100.00 |
| Priors |
0.30556
|
0.19444
|
0.16667
|
0.16667
|
0.16667
|
|
| Error Count Estimates for Crop |
| |
Clover |
Corn |
Cotton |
Soybeans |
Sugarbeets |
Total |
| Rate |
0.1818 |
0.0000 |
0.0000 |
0.0000 |
0.3333 |
0.1111 |
| Priors |
0.3056 |
0.1944 |
0.1667 |
0.1667 |
0.1667 |
|
|
|
| Discriminant Analysis of Remote Sensing Data on Five Crops |
| Using Quadratic Discriminant Function |
| The DISCRIM Procedure |
| Classification Summary for Calibration Data: WORK.CROPS |
| Cross-validation Summary using Quadratic Discriminant Function |
| Number of Observations and Percent Classified into Crop |
| From Crop |
Clover |
Corn |
Cotton |
Soybeans |
Sugarbeets |
Total |
| Clover |
9
81.82 |
0
0.00 |
0
0.00 |
0
0.00 |
2
18.18 |
11
100.00 |
| Corn |
3
42.86 |
2
28.57 |
0
0.00 |
0
0.00 |
2
28.57 |
7
100.00 |
| Cotton |
3
50.00 |
0
0.00 |
2
33.33 |
0
0.00 |
1
16.67 |
6
100.00 |
| Soybeans |
3
50.00 |
0
0.00 |
0
0.00 |
2
33.33 |
1
16.67 |
6
100.00 |
| Sugarbeets |
3
50.00 |
0
0.00 |
1
16.67 |
1
16.67 |
1
16.67 |
6
100.00 |
| Total |
21
58.33 |
2
5.56 |
3
8.33 |
3
8.33 |
7
19.44 |
36
100.00 |
| Priors |
0.30556
|
0.19444
|
0.16667
|
0.16667
|
0.16667
|
|
| Error Count Estimates for Crop |
| |
Clover |
Corn |
Cotton |
Soybeans |
Sugarbeets |
Total |
| Rate |
0.1818 |
0.7143 |
0.6667 |
0.6667 |
0.8333 |
0.5556 |
| Priors |
0.3056 |
0.1944 |
0.1667 |
0.1667 |
0.1667 |
|
|
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.