GRASS logo

Note: A new GRASS GIS stable version has been released: GRASS GIS 7. Go directly to the new manual page here

NAME

r.kappa - Calculate error matrix and kappa parameter for accuracy assessment of classification result.

KEYWORDS

raster, statistics

SYNOPSIS

r.kappa
r.kappa help
r.kappa [-wqh] classification=name reference=name [output=name] [title=string] [--verbose] [--quiet]

Flags:

-w
Wide report
132 columns (default: 80)
-q
Quiet
-h
No header in the report
--verbose
Verbose module output
--quiet
Quiet module output

Parameters:

classification=name
Name of raster map containing classification result
reference=name
Name of raster map containing reference classes
output=name
Name for output file containing error matrix and kappa
title=string
Title for error matrix and kappa
Default: ACCURACY ASSESSMENT

DESCRIPTION

r.kappa tabulates the error matrix of classification result by crossing classified map layer with respect to reference map layer. Both overall kappa (accompanied by its variance) and conditional kappa values are calculated. This analysis program respects the current geographic region and mask settings.

r.kappa calculates the error matrix of the two map layers and prepares the table from which the report is to be created. kappa values for overall and each classes are computed along with their variances. Also percent of commission and ommission error, total correct classified result by pixel counts, total area in pixel counts and percentage of overall correctly classified pixels are tabulated.

The report will be write to an output file which is in plain text format and named by user at prompt of running the program.

The body of the report is arranged in panels. The classified result map layer categories is arranged along the vertical axis of the table, while the reference map layer categories along the horizontal axis. Each panel has a maximum of 5 categories (9 if wide format) across the top. In addition, the last column of the last panel reflects a cross total of each column for each row. All of the categories of the map layer arranged along the vertical axis, i.e., the reference map layer, are included in each panel. There is a total at the bottom of each column representing the sum of all the rows in that column.

NOTES

It is recommended to reclassify categories of classified result map layer into a more manageable number before running r.kappa on the classified raster map layer. Because r.kappa calculates and then reports information for each and every category.

NA's in output file mean non-applicable in case MASK exists.

EXAMPLE

Example for North Carolina sample dataset:
g.region rast=landclass96 -p
r.kappa -w classification=landuse96_28m reference=landclass96

Verification of classified LANDSAT scene against training areas:

r.kappa -w classification=lsat7_2002_classes reference=training

SEE ALSO

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

AUTHOR

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

Last changed: $Date: 2014-05-05 12:40:05 -0700 (Mon, 05 May 2014) $


Main index - raster index - Full index

© 2003-2016 GRASS Development Team