Skip to content

Commit

Permalink
r.confusionmatrix: fix tests (OSGeo#846)
Browse files Browse the repository at this point in the history
* change result data after r.kappa change

---------

Co-authored-by: anikaweinmann <[email protected]>
Co-authored-by: Markus Neteler <[email protected]>
  • Loading branch information
3 people authored and Corey White committed Sep 19, 2023
1 parent b4b6a2b commit 2a358bb
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/raster/r.confusionmatrix/r.confusionmatrix.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ <h2>SEE ALSO</h2>

<h2>AUTHOR</h2>

Anika Bettge, mundialis GmbH &amp; Co. KG
Anika Weinmann, <a href="https://www.mundialis.de/">mundialis GmbH &amp; Co. KG</a>
8 changes: 4 additions & 4 deletions src/raster/r.confusionmatrix/r.confusionmatrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

############################################################################
#
# MODULE: r.confusionmatrix
# MODULE: r.confusionmatrix
#
# AUTHOR(S): Anika Bettge <bettge at mundialis.de>
# AUTHOR(S): Anika Weinmann <weinmann at mundialis.de>
#
# PURPOSE: Calculates a confusion matrix and accuracies for a given classification using r.kappa.
# PURPOSE: Calculates a confusion matrix and accuracies for a given classification using r.kappa.
#
# COPYRIGHT: (C) 2020 by mundialis and the GRASS Development Team
# COPYRIGHT: (C) 2020-2023 by mundialis and the GRASS Development Team
#
# This program is free software under the GNU General Public
# License (>=v2). Read the file COPYING that comes with GRASS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
,,Reference Map,landclass96
,,developed,agriculture,herbaceous,shrubland,forest,water,sediment,Class_7,Class_8,Class_9,Class_10,Class_11,Class_12,Class_13,Class_14,User Accuracy,Commission Error
,,developed,agriculture,herbaceous,shrubland,forest,water,sediment,8,9,10,11,15,18,20,21,User Accuracy,Commission Error
Classified Map,High Intensity Developed,34931,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100.0,0.0
landuse96_28m,Low Intensity Developed,38146,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.0,100.0
,Cultivated,0,2137,0,0,0,0,0,0,0,0,0,0,0,0,0,0.0,100.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
,,Reference Map,landclass96_class1only
,,Class_0,User Accuracy,Commission Error
Classified Map,Class_0,73077,100.0,0.0
,,1,User Accuracy,Commission Error
Classified Map,1,73077,100.0,0.0
landuse96_28m_class1only,,,,
,Producer Accuracy,100.0,Overall Accuracy,100.0
,Omission Error,0.0,Kappa coefficient,nan
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Name: r.confusionmatrix test
Purpose: Tests r.confusionmatrix input parsing.
Uses NC full sample data set.
Author: Anika Bettge
Copyright: (C) 2020 Anika Bettge, mundialis, and the GRASS Development Team
Author: Anika Weinmann
Copyright: (C) 2020-2023 Anika Weinmann, mundialis, and the GRASS Development Team
Licence: This program is free software under the GNU General Public
License (>=v2). Read the file COPYING that comes with GRASS
for details.
Expand Down Expand Up @@ -67,7 +67,6 @@ def test_confusionmatrix_with_raster_reference(self):
# check to see if output file exists
self.assertFileExists(self.output_csv, msg="Output file does not exist")
# check if the output file is equal to the reference file

self.assertFilesEqualMd5(
self.output_csv,
"data/confusionmatrix_raster_matrix.csv",
Expand Down

0 comments on commit 2a358bb

Please sign in to comment.