1r.kappa(1)                    Grass User's Manual                   r.kappa(1)
2
3
4

NAME

6       r.kappa   -  Calculates  error  matrix and kappa parameter for accuracy
7       assessment of classification result.
8

KEYWORDS

10       raster, statistics, classification
11

SYNOPSIS

13       r.kappa
14       r.kappa --help
15       r.kappa  [-whm]   classification=name   reference=name    [output=name]
16       [title=string]     [--overwrite]    [--help]    [--verbose]   [--quiet]
17       [--ui]
18
19   Flags:
20       -w
21           Wide report
22           132 columns (default: 80)
23
24       -h
25           No header in the report
26
27       -m
28           Print Matrix only
29
30       --overwrite
31           Allow output files to overwrite existing files
32
33       --help
34           Print usage summary
35
36       --verbose
37           Verbose module output
38
39       --quiet
40           Quiet module output
41
42       --ui
43           Force launching GUI dialog
44
45   Parameters:
46       classification=name [required]
47           Name of raster map containing classification result
48
49       reference=name [required]
50           Name of raster map containing reference classes
51
52       output=name
53           Name for output file containing error matrix and kappa
54           If not given write to standard output
55
56       title=string
57           Title for error matrix and kappa
58           Default: ACCURACY ASSESSMENT
59

DESCRIPTION

61       r.kappa tabulates the error matrix of classification result by crossing
62       classified map layer with respect to reference map layer.  Both overall
63       kappa (accompanied by its variance) and conditional  kappa  values  are
64       calculated.   This  analysis  program  respects  the current geographic
65       region and mask settings.
66
67       r.kappa calculates the error matrix of the two map layers and  prepares
68       the  table  from  which  the report is to be created.  kappa values for
69       overall and each classes are computed along with their variances.  Also
70       percent  of  commission  and  ommission error, total correct classified
71       result by pixel counts, total area in pixel counts  and  percentage  of
72       overall correctly classified pixels are tabulated.
73
74       The  report will be write to an output file which is in plain text for‐
75       mat and named by user at prompt of running the program.
76
77       The body of the report is arranged in panels.   The  classified  result
78       map  layer categories is arranged along the vertical axis of the table,
79       while the reference map layer categories  along  the  horizontal  axis.
80       Each  panel has a maximum of 5 categories (9 if wide format) across the
81       top.  In addition, the last column of the last panel reflects  a  cross
82       total  of  each  column for each row.  All of the categories of the map
83       layer arranged along the vertical axis, i.e., the reference map  layer,
84       are  included  in  each  panel.  There is a total at the bottom of each
85       column representing the sum of all the rows in that column.
86

NOTES

88       It is recommended to reclassify categories  of  classified  result  map
89       layer into a more manageable number before running r.kappa on the clas‐
90       sified raster map layer. Because r.kappa calculates  and  then  reports
91       information for each and every category.
92
93       NA’s in output file mean non-applicable in case MASK exists.
94
95       The  Estimated  kappa value in r.kappa is the value only for one class,
96       i.e. the observed  agreement  between  the  classifications  for  those
97       observations  that  have been classified by classifier 1 into the class
98       i. In other words, here the choice of reference is important.
99
100       It is calculated as:
101
102       kpp[i] = (pii[i] - pi[i] * pj[i]) / (pi[i] - pi[i] * pj[i]);
103
104       where=
105
106           ·   pii[i] is the probability of agreement (i.e. number  of  pixels
107               for  which  there  is  agreement  divided  by  total  number of
108               assessed pixels)
109
110           ·   Pi[i] is the probability of classification i having  classified
111               the point as i
112
113           ·   Pj[i]  is the probability of classification j having classified
114               the point as i.
115

EXAMPLE

117       Example for North Carolina sample dataset:
118       g.region raster=landclass96 -p
119       r.kappa -w classification=landuse96_28m reference=landclass96
120
121       Verification of classified LANDSAT scene against training areas:
122       r.kappa -w classification=lsat7_2002_classes reference=training
123

SEE ALSO

125       g.region, r.category, r.mask, r.reclass, r.report, r.stats
126

AUTHOR

128       Tao Wen, University of Illinois at Urbana-Champaign, Illinois
129

SOURCE CODE

131       Available at: r.kappa source code (history)
132
133       Main index | Raster index | Topics index | Keywords index  |  Graphical
134       index | Full index
135
136       © 2003-2019 GRASS Development Team, GRASS GIS 7.8.2 Reference Manual
137
138
139
140GRASS 7.8.2                                                         r.kappa(1)
Impressum