<?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: Confusion matrix issue in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/confusion-matrix-issue/m-p/1202948#M58635</link>
    <description>&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;Where are you in the process? Do you have a shapefile with the values? If so, you can import the shapefile attribute table as a numpy array and then use do it within python.&lt;/P&gt;&lt;P&gt;Something kind of like this.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from sklearn.metrics import confusion_matrix

shp = 'path\\to\\shapefile.shp'
truth = arcpy.da.TableToNumPyArray(shp,'truth')
model = arcpy.da.TableToNumPyArray(shp,'model')
cm =confusion_matrix(model, truth)&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 15 Aug 2022 16:52:32 GMT</pubDate>
    <dc:creator>WadeWall</dc:creator>
    <dc:date>2022-08-15T16:52:32Z</dc:date>
    <item>
      <title>Confusion matrix issue</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/confusion-matrix-issue/m-p/1202745#M58607</link>
      <description>&lt;P&gt;&lt;SPAN&gt;So I am trying to create an accuracy assessment for some sites in an image that I have been working on. My work so far has been drawing polygons around areas of wetland in an image from 1995, and doing the same for the same area in 2014, and computing the difference in polygon size in m^2 in order to detect erosion of the sites. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I went to the sites and collected ground truth data within the study areas (GPS points). I classified in the field wether or not the points were (1) wetland, (2) eroded or (3) grass/shrub Now I am trying to create a confusion matrix for these points by classifying the same points I collected in the field (the ground truth data) within arcGIS by eye (in order to mimic how arcGIS would classify the images based off of pixel values). &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Where I am struggling is in actually creating a feature layer with an attribute table that contains both my GPS points and their groundtruth classification as well as the classification I gave to them manually, and then feeding this layer into the compute confusion matrix tool. If you can provide any help at all I would really appreciate it. Thank you&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2022 09:01:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/confusion-matrix-issue/m-p/1202745#M58607</guid>
      <dc:creator>JohnCregan</dc:creator>
      <dc:date>2022-08-15T09:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: Confusion matrix issue</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/confusion-matrix-issue/m-p/1202948#M58635</link>
      <description>&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;Where are you in the process? Do you have a shapefile with the values? If so, you can import the shapefile attribute table as a numpy array and then use do it within python.&lt;/P&gt;&lt;P&gt;Something kind of like this.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from sklearn.metrics import confusion_matrix

shp = 'path\\to\\shapefile.shp'
truth = arcpy.da.TableToNumPyArray(shp,'truth')
model = arcpy.da.TableToNumPyArray(shp,'model')
cm =confusion_matrix(model, truth)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 15 Aug 2022 16:52:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/confusion-matrix-issue/m-p/1202948#M58635</guid>
      <dc:creator>WadeWall</dc:creator>
      <dc:date>2022-08-15T16:52:32Z</dc:date>
    </item>
  </channel>
</rss>

