How can I get a confusion matrix using specific columns in two different rasters in ArcGIS ? I have one raster of risk classes 1,2,3,4 and another raster of land cover A, B, C,D. I am looking for a matrix showing number of cell count for each land cover in each risk class.
-
4You mean this? esri.com/library/brochures/pdfs/… you did say "confusion" matrix...!!!– DPSSpatial_BoycottingGISSESep 20, 2016 at 15:30
-
I wish I could give more than one upvote!– ed.hankSep 20, 2016 at 15:46
-
1The SpatialAnalyst extension does have a Compute Confusion Matrix tool (perhaps only 10.4?), you may want to start there if you hadn't looked at it– Evil GeniusSep 20, 2016 at 16:12
-
Mine is 10.3, and looks like it does not have that tool. Thanks for the update for newer version.– user65127Sep 20, 2016 at 16:40
1 Answer
I think the tool you want is not Compute Confusion Matrix as it is mainly used for accuracy assessment to compare the classified map with ground truth data. The following I quote from the help above:
Computes a confusion matrix based on errors of omission and commission, then derives a kappa index of agreement between the classified map and data that is considered to be ground truth.
This tool uses the outputs from the Create Accuracy Assessment Points tool or the Update Accuracy Assessment Points tool.
The tool you need is Tabulate Area. Tabulate area is used to calculate the area of zones within each another zone. So in your case you may use the land cover data as input data and the risk class as zone data. Then the tool will calculate the area of each land cover within each risk zone. Finally:
the number of cells/pixels (in each risk zone) = total area/cell size (pixel area)