r.kappa.html 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <h2>DESCRIPTION</h2>
  2. <em>r.kappa</em> tabulates the error matrix of classification result by
  3. crossing classified map layer with respect to reference map layer. Both
  4. overall <em>kappa</em> (accompanied by its <em>variance</em>) and
  5. conditional <em>kappa</em> values are calculated. This analysis program
  6. respects the current geographic region and mask settings.
  7. <p>
  8. <em>r.kappa</em> calculates the error matrix of the
  9. two map layers and prepares the table from which the report
  10. is to be created. <em>kappa</em> values for overall and
  11. each classes are computed along with their variances. Also
  12. percent of commission and ommission error, total correct
  13. classified result by pixel counts, total area in pixel
  14. counts and percentage of overall correctly classified
  15. pixels are tabulated.
  16. <p>
  17. The report will be write to an output file which is in
  18. plain text format and named by user at prompt of running
  19. the program.
  20. <p>
  21. The body of the report is arranged in panels. The
  22. classified result map layer categories is arranged along
  23. the vertical axis of the table, while the reference map
  24. layer categories along the horizontal axis. Each panel has
  25. a maximum of 5 categories (9 if wide format) across the
  26. top. In addition, the last column of the last panel
  27. reflects a cross total of each column for each row. All of
  28. the categories of the map layer arranged along the vertical
  29. axis, i.e., the reference map layer, are included in each
  30. panel. There is a total at the bottom of each column
  31. representing the sum of all the rows in that column.
  32. <h2>NOTES</h2>
  33. It is recommended to reclassify categories of classified
  34. result map layer into a more manageable number before
  35. running <em>r.kappa</em> on the classified raster map
  36. layer. Because <em>r.kappa</em> calculates and then reports
  37. information for each and every category.
  38. <p>
  39. <em>NA</em>'s in output file mean non-applicable in case
  40. <em>MASK</em> exists.
  41. <p>
  42. The <b>Estimated kappa value</b> in <em>r.kappa</em> is the value
  43. only for one class, i.e. the observed agreement between the
  44. classifications for those observations that have been classified by
  45. classifier 1 into the class i. In other words, here the choice of
  46. reference is important.
  47. <p>
  48. It is calculated as:
  49. <p>
  50. kpp[i] = (pii[i] - pi[i] * pj[i]) / (pi[i] - pi[i] * pj[i]);
  51. <p>
  52. where=
  53. <ul>
  54. <li>pii[i] is the probability of agreeement (i.e. number of pixels for which there is agreement divided by total number of assessed pixels)</li>
  55. <li>Pi[i] is the probability of classification i having classified the point as i</li>
  56. <li>Pj[i] is the probability of classification j having classified the point as i.</li>
  57. </ul>
  58. <H2>EXAMPLE</H2>
  59. Example for North Carolina sample dataset:
  60. <div class="code"><pre>
  61. g.region raster=landclass96 -p
  62. r.kappa -w classification=landuse96_28m reference=landclass96
  63. </pre></div>
  64. <p>
  65. Verification of classified LANDSAT scene against training areas:
  66. <div class="code"><pre>
  67. r.kappa -w classification=lsat7_2002_classes reference=training
  68. </pre></div>
  69. <h2>SEE ALSO</h2>
  70. <em><a href="g.region.html">g.region</a></em>,
  71. <!--<em><a href="m.ipf.html">m.ipf</a></em>,-->
  72. <em><a href="r.category.html">r.category</a></em>,
  73. <em><a href="r.mask.html">r.mask</a></em>,
  74. <em><a href="r.reclass.html">r.reclass</a></em>,
  75. <em><a href="r.report.html">r.report</a></em>,
  76. <em><a href="r.stats.html">r.stats</a></em>
  77. <h2>AUTHOR</h2>
  78. Tao Wen, University of Illinois at Urbana-Champaign, Illinois
  79. <p>
  80. <i>Last changed: $Date$</i>