Hi list,<br><br>I have a query regarding the error matrix produced<br>using r.kappa (in GRASS 6.4.0 RC6) and hoping that <br>the following will help someone to replicate my findings. <br>From what I see, the error matrix is mis-labeling the <br>
rows/columns in the matrix.<br><br>Using the spearfish dataset, I digitised 18 points<br>to create a reference dataset to validate<br>the classification, in this case the raster &#39;landcover.orig&#39; <br>For the purposes of the test and simplicity, I ensured <br>
that the points  were located within two landcover classes <br>(raster values 42 and 81). The following steps were carried out<br>to generate the output from r.kappa <br><br><br>#Create reference dataset <br>d.where | r.what input=landcover.orig &gt; kappa_test.txt<br>
<br>For the purposes of this test, I deliberately changed the<br>landcover class from 42 to 32 in the validation dataset [1] <br>This will create an off-diagonal value in the error matrix.<br><br>#Create the vector point from ascii and convert to raster<br>
v.in.ascii input=kappa_test output=kapp_test cat=4<br>v.to.rast input=kapp_test output=validation use=cat<br><br>#Run r.kappa <br>r.kappa classification=landcover.orig reference=validation output=validation.txt<br><br>The output from r.kappa  (validation.txt) is below, however, it appears <br>
to me that the matrix is transposed, i.e. the horizontal values <br>(MAP1) should in fact be vertical. From my interpretation, the error <br>matrix indicates that 8 validation points with the value 42 were <br>classified as 32, but in fact it should state that 8 points with <br>
the value of 32 were classified as 42? Can anyone confirm<br>my findings?<br><br>Thanks in advance.<br><br>Regards,<br>Daniel.  <br><br><br>                        ACCURACY ASSESSMENT<br>LOCATION: spearfish60                           Fri Apr  1 12:45:42 2011<br>
MASK: none<br>MAPS: MAP1 = Categories (validation in user1)<br>      MAP2 = (untitled) (landcover.orig in PERMANENT)<br><br>Error Matrix<br>Panel #1 of 1<br>                          MAP1<br>     cat#       32      42      81      Row Sum<br>
 M    32        0       8       0       8<br> A    42        0       0       0       0<br> P    81        0       0       10      10<br>Col Sum         0       8       10      18<br><br><br>Cats    % Commission    % Ommission     Estimated Kappa<br>
32      100.000000      -nan    -999.000000<br>42      NA              NA              NA<br>81      0.000000        0.000000        1.000000<br><br>Kappa           Kappa Variance<br>0.357143        0.002343<br><br>Obs Correct     Total Obs       % Observed Correct<br>
10              18              55.555556<br><br><br><br>[1]<br>#validation input<br>590188.6875|4919453.8125||32<br>590188.6875|4918947||32<br>590307.9375|4918350.75||32<br>590576.25|4917694.875||32<br>590307.9375|4917694.875||32<br>
590546.4375|4919364.375||32<br>590874.375|4919364.375||32<br>590904.1875|4919483.625||32<br>603604.3125|4922047.5||81<br>603336|4922315.8125||81<br>603514.875|4922464.875||81<br>603604.3125|4922256.1875||81<br>603634.125|4922107.125||81<br>
603693.75|4921987.875||81<br>603962.0625|4921987.875||81<br>603753.375|4921600.3125||81<br>603962.0625|4922047.5||81<br>598983.375|4922256.1875||81<br><br><br><br>