Thanks for your email Markus. That&#39;s a necessary fix <br>to r.kappa - one that may not be immediately<br>obvious if the errors of omission and commission are more<br>evenly dispersed between classes. <br><br>Regarding the individual class errors, would it make sense to<br>
simplify or standardise the values: -999.0000; -nan and NA<br>that are each reported within the r.kappa output?<br><br>Regards,<br>Daniel.<br><br><div class="gmail_quote">On Fri, Apr 1, 2011 at 3:42 PM, Markus Metz <span dir="ltr">&lt;<a href="mailto:markus.metz.giswork@googlemail.com">markus.metz.giswork@googlemail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">On Fri, Apr 1, 2011 at 2:45 PM, daniel mcinerney<br>
&lt;<a href="mailto:daniel.o.mcinerney@gmail.com">daniel.o.mcinerney@gmail.com</a>&gt; wrote:<br>
&gt; Hi list,<br>
&gt;<br>
&gt; I have a query regarding the error matrix produced<br>
&gt; using r.kappa (in GRASS 6.4.0 RC6) and hoping that<br>
&gt; the following will help someone to replicate my findings.<br>
&gt; From what I see, the error matrix is mis-labeling the<br>
&gt; rows/columns in the matrix.<br>
&gt;<br>
</div>Right, I noticed that some months ago, but fixed it only in grass 7.<br>
Now also fixed in 6.5 and 6.4 (r45818 and r45819, respectively).<br>
<br>
Markus M<br>
<div><div></div><div class="h5"><br>
&gt; Using the spearfish dataset, I digitised 18 points<br>
&gt; to create a reference dataset to validate<br>
&gt; the classification, in this case the raster &#39;landcover.orig&#39;<br>
&gt; For the purposes of the test and simplicity, I ensured<br>
&gt; that the points  were located within two landcover classes<br>
&gt; (raster values 42 and 81). The following steps were carried out<br>
&gt; to generate the output from r.kappa<br>
&gt;<br>
&gt;<br>
&gt; #Create reference dataset<br>
&gt; d.where | r.what input=landcover.orig &gt; kappa_test.txt<br>
&gt;<br>
&gt; For the purposes of this test, I deliberately changed the<br>
&gt; landcover class from 42 to 32 in the validation dataset [1]<br>
&gt; This will create an off-diagonal value in the error matrix.<br>
&gt;<br>
&gt; #Create the vector point from ascii and convert to raster<br>
&gt; v.in.ascii input=kappa_test output=kapp_test cat=4<br>
&gt; v.to.rast input=kapp_test output=validation use=cat<br>
&gt;<br>
&gt; #Run r.kappa<br>
&gt; r.kappa classification=landcover.orig reference=validation<br>
&gt; output=validation.txt<br>
&gt;<br>
&gt; The output from r.kappa  (validation.txt) is below, however, it appears<br>
&gt; to me that the matrix is transposed, i.e. the horizontal values<br>
&gt; (MAP1) should in fact be vertical. From my interpretation, the error<br>
&gt; matrix indicates that 8 validation points with the value 42 were<br>
&gt; classified as 32, but in fact it should state that 8 points with<br>
&gt; the value of 32 were classified as 42? Can anyone confirm<br>
&gt; my findings?<br>
&gt;<br>
&gt; Thanks in advance.<br>
&gt;<br>
&gt; Regards,<br>
&gt; Daniel.<br>
&gt;<br>
&gt;<br>
&gt;                         ACCURACY ASSESSMENT<br>
&gt; LOCATION: spearfish60                           Fri Apr  1 12:45:42 2011<br>
&gt; MASK: none<br>
&gt; MAPS: MAP1 = Categories (validation in user1)<br>
&gt;       MAP2 = (untitled) (landcover.orig in PERMANENT)<br>
&gt;<br>
&gt; Error Matrix<br>
&gt; Panel #1 of 1<br>
&gt;                           MAP1<br>
&gt;      cat#       32      42      81      Row Sum<br>
&gt;  M    32        0       8       0       8<br>
&gt;  A    42        0       0       0       0<br>
&gt;  P    81        0       0       10      10<br>
&gt; Col Sum         0       8       10      18<br>
&gt;<br>
&gt;<br>
&gt; Cats    % Commission    % Ommission     Estimated Kappa<br>
&gt; 32      100.000000      -nan    -999.000000<br>
&gt; 42      NA              NA              NA<br>
&gt; 81      0.000000        0.000000        1.000000<br>
&gt;<br>
&gt; Kappa           Kappa Variance<br>
&gt; 0.357143        0.002343<br>
&gt;<br>
&gt; Obs Correct     Total Obs       % Observed Correct<br>
&gt; 10              18              55.555556<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; [1]<br>
&gt; #validation input<br>
&gt; 590188.6875|4919453.8125||32<br>
&gt; 590188.6875|4918947||32<br>
&gt; 590307.9375|4918350.75||32<br>
&gt; 590576.25|4917694.875||32<br>
&gt; 590307.9375|4917694.875||32<br>
&gt; 590546.4375|4919364.375||32<br>
&gt; 590874.375|4919364.375||32<br>
&gt; 590904.1875|4919483.625||32<br>
&gt; <a href="tel:603604.3125">603604.3125</a>|4922047.5||81<br>
&gt; 603336|4922315.8125||81<br>
&gt; 603514.875|4922464.875||81<br>
&gt; <a href="tel:603604.3125">603604.3125</a>|4922256.1875||81<br>
&gt; 603634.125|4922107.125||81<br>
&gt; 603693.75|4921987.875||81<br>
&gt; <a href="tel:603962.0625">603962.0625</a>|4921987.875||81<br>
&gt; 603753.375|4921600.3125||81<br>
&gt; <a href="tel:603962.0625">603962.0625</a>|4922047.5||81<br>
&gt; 598983.375|4922256.1875||81<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; grass-user mailing list<br>
&gt; <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
&gt; <a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
&gt;<br>
&gt;<br>
</blockquote></div><br>