Note: This document is for an older version of GRASS GIS that is outdated. You should upgrade, and read the current addon manual page.

GRASS logo

NAME

r.confusionmatrix - Calculates a confusion matrix and accuracies for a given classification using r.kappa.

KEYWORDS

raster, statistics, accuracy, classification

SYNOPSIS

r.confusionmatrix
r.confusionmatrix --help
r.confusionmatrix [-dm] [classification=name] [raster_reference=name] [vector_reference=name] [column=name] [label_column=name] [csvfile=name] [--overwrite] [--help] [--verbose] [--quiet] [--ui]

Flags:

-d
Description of the accuracies
-m
Print output as a matrix
--overwrite
Allow output files to overwrite existing files
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--ui
Force launching GUI dialog

Parameters:

classification=name
Name of raster map containing classification result
raster_reference=name
Name of raster map containing reference classes
vector_reference=name
Name of input vector map
Name of vector map containing reference classes
column=name
Name of column in the vector map containing reference classes
label_column=name
Name of column used as raster category labels
csvfile=name
Name for output csv file containing confusion matrix and accuracies
If not given write to standard output

Table of contents

DESCRIPTION

r.confusionmatrix calculates the confusion matrix, overall, user and producer accuracies, the omission and commission errors and the Kappa coefficient of classification result using r.kappa.

NOTES

The reference can be a raster map raster_reference or a vector map vector_reference with a column containing the class labels as integer numbers.

In case of vector reference, this map is rasterized according to the extent and resolution of the classification raster map.

EXAMPLE

Compute the confusion matrix as a CSV file including description of the accuracies:
r.confusionmatrix classification=classified raster_reference=trainingmap csvfile=test.csv -d

SEE ALSO

r.kappa

AUTHOR

Anika Bettge, mundialis GmbH & Co. KG

SOURCE CODE

Available at: r.confusionmatrix source code (history)

Latest change: Thu Feb 3 09:32:35 2022 in commit: f17c792f5de56c64ecfbe63ec315307872cf9d5c


Main index | Raster index | Topics index | Keywords index | Graphical index | Full index

© 2003-2022 GRASS Development Team, GRASS GIS 8.0.3dev Reference Manual