<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Calculate classification accuracy from dbf? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/calculate-classification-accuracy-from-dbf/m-p/378656#M29878</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could try using arcpy's &lt;A href="http://resources.arcgis.com/en/help/main/10.2/0012/001200000027000000.htm"&gt;Table to Table Conversion&lt;/A&gt; instead of dbfread. That would also let you use the &lt;A href="http://resources.arcgis.com/en/help/main/10.2/018w/018w00000011000000.htm"&gt;arcpy.da cursors&lt;/A&gt; for easy iteration over the rows. Could you post a sample of what your desired overall accuracies output would look like?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Mar 2015 17:14:00 GMT</pubDate>
    <dc:creator>BlakeTerhune</dc:creator>
    <dc:date>2015-03-10T17:14:00Z</dc:date>
    <item>
      <title>Calculate classification accuracy from dbf?</title>
      <link>https://community.esri.com/t5/python-questions/calculate-classification-accuracy-from-dbf/m-p/378655#M29877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have dozens of DBFs and each contains a classification error matrix. From each of these matrices I would like to calculate overall, user's and producer's accuracies.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What would be the best method to do that? I have one additional obstacle, just to make the problem a little more challenging; sometimes (but not always) I have more/less predicted classes than the "truth" class has. See the example below, where in the "predicted (Class)" column there is class "B" while the same class does not appear in the "truth" classes. &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used dbfread to read the dbf data.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OrderedDict([(u'Class', u'A'), (u'_A', 14), (u'_C', 0), (u'_D', 3), (u'_E', 9), (u'_F', 8)])&lt;/P&gt;&lt;P&gt;OrderedDict([(u'Class', u'B'), (u'_A', 0), (u'_C', 0), (u'_D', 29), (u'_E', 1), (u'_F', 0)])&lt;/P&gt;&lt;P&gt;OrderedDict([(u'Class', u'C'), (u'_A', 0), (u'_C', 149), (u'_D', 101), (u'_E', 0), (u'_F', 2)])&lt;/P&gt;&lt;P&gt;OrderedDict([(u'Class', u'D'), (u'_A', 33), (u'_C', 0), (u'_D', 594), (u'_E', 41), (u'_F', 96)])&lt;/P&gt;&lt;P&gt;OrderedDict([(u'Class', u'E'), (u'_A', 62), (u'_C', 1), (u'_D', 38), (u'_E', 12), (u'_F', 28)])&lt;/P&gt;&lt;P&gt;OrderedDict([(u'Class', u'F'), (u'_A', 95), (u'_C', 34), (u'_D', 665), (u'_E', 38), (u'_F', 47)])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 13:57:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-classification-accuracy-from-dbf/m-p/378655#M29877</guid>
      <dc:creator>ErtTre</dc:creator>
      <dc:date>2015-02-09T13:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate classification accuracy from dbf?</title>
      <link>https://community.esri.com/t5/python-questions/calculate-classification-accuracy-from-dbf/m-p/378656#M29878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could try using arcpy's &lt;A href="http://resources.arcgis.com/en/help/main/10.2/0012/001200000027000000.htm"&gt;Table to Table Conversion&lt;/A&gt; instead of dbfread. That would also let you use the &lt;A href="http://resources.arcgis.com/en/help/main/10.2/018w/018w00000011000000.htm"&gt;arcpy.da cursors&lt;/A&gt; for easy iteration over the rows. Could you post a sample of what your desired overall accuracies output would look like?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2015 17:14:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calculate-classification-accuracy-from-dbf/m-p/378656#M29878</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2015-03-10T17:14:00Z</dc:date>
    </item>
  </channel>
</rss>

