<?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 Training sample assignment of raster pixels to class in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/training-sample-assignment-of-raster-pixels-to/m-p/1705838#M103437</link>
    <description>&lt;P&gt;When training samples are developed for raster classification (using irregular polygons to manually perform a supervised classification), how is class membership assigned to the raster pixels for training? I think it's one of the following ways:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;pixel membership to a class is assigned when any pixel of a raster intersects in any way with the training sample, OR&lt;/LI&gt;&lt;LI&gt;pixel membership to a class is assigned if the training sample intersects the input raster pixel centoid&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;The reason for my asking is that I’ve used python to developed a Withheld Data Test for my Random Forest/random trees classifier, which I’ve had to do manually.&lt;/P&gt;&lt;P&gt;The Withheld Data Test involves:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Create fishnet 1px x 1px&lt;/LI&gt;&lt;LI&gt;Intersect tool to select fishnet by attribute where it intersects with TS&lt;/LI&gt;&lt;LI&gt;Export selected pixels&lt;/LI&gt;&lt;LI&gt;Randomly assign pixels within the training samples fishnet a number 0.0 – 1.0, randomly split them 70%/30% and assign membership to two TS classes - Test30 and Training70. Note that these two classes maintain the class values of the original training samples.&lt;/LI&gt;&lt;LI&gt;Erase the location of Test30 pixels from the training samples, resulting in irregular polygons that look like Training70 fishnet.&lt;/LI&gt;&lt;LI&gt;The way I’m choosing the conditions of membership of the 30% of pixels that I’m excluding from my TS should be the same as how the training samples classify raster pixels into a class.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I hope that this makes sense! It would be great to get clarification so that I can tune my model properly. Also, this matters as the training samples I need to develop are quite small (i.e. IDing shadow for trees can be like 5x5 pixels, and for an entire site I’m often only training about 5000 pixels). It makes a big difference to my model (the 30% of test pixels can actually become 25 – 35% of the TS pixels if it's done inconsistently with how Esri does things). Thankfully, I'm getting 98% kappa value already, so the small sample sizing is working well.&lt;BR /&gt;&lt;BR /&gt;Any help is greatly appreciated. \m/&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jun 2026 03:52:26 GMT</pubDate>
    <dc:creator>JanniceBanks</dc:creator>
    <dc:date>2026-06-03T03:52:26Z</dc:date>
    <item>
      <title>Training sample assignment of raster pixels to class</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/training-sample-assignment-of-raster-pixels-to/m-p/1705838#M103437</link>
      <description>&lt;P&gt;When training samples are developed for raster classification (using irregular polygons to manually perform a supervised classification), how is class membership assigned to the raster pixels for training? I think it's one of the following ways:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;pixel membership to a class is assigned when any pixel of a raster intersects in any way with the training sample, OR&lt;/LI&gt;&lt;LI&gt;pixel membership to a class is assigned if the training sample intersects the input raster pixel centoid&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;The reason for my asking is that I’ve used python to developed a Withheld Data Test for my Random Forest/random trees classifier, which I’ve had to do manually.&lt;/P&gt;&lt;P&gt;The Withheld Data Test involves:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Create fishnet 1px x 1px&lt;/LI&gt;&lt;LI&gt;Intersect tool to select fishnet by attribute where it intersects with TS&lt;/LI&gt;&lt;LI&gt;Export selected pixels&lt;/LI&gt;&lt;LI&gt;Randomly assign pixels within the training samples fishnet a number 0.0 – 1.0, randomly split them 70%/30% and assign membership to two TS classes - Test30 and Training70. Note that these two classes maintain the class values of the original training samples.&lt;/LI&gt;&lt;LI&gt;Erase the location of Test30 pixels from the training samples, resulting in irregular polygons that look like Training70 fishnet.&lt;/LI&gt;&lt;LI&gt;The way I’m choosing the conditions of membership of the 30% of pixels that I’m excluding from my TS should be the same as how the training samples classify raster pixels into a class.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I hope that this makes sense! It would be great to get clarification so that I can tune my model properly. Also, this matters as the training samples I need to develop are quite small (i.e. IDing shadow for trees can be like 5x5 pixels, and for an entire site I’m often only training about 5000 pixels). It makes a big difference to my model (the 30% of test pixels can actually become 25 – 35% of the TS pixels if it's done inconsistently with how Esri does things). Thankfully, I'm getting 98% kappa value already, so the small sample sizing is working well.&lt;BR /&gt;&lt;BR /&gt;Any help is greatly appreciated. \m/&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2026 03:52:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/training-sample-assignment-of-raster-pixels-to/m-p/1705838#M103437</guid>
      <dc:creator>JanniceBanks</dc:creator>
      <dc:date>2026-06-03T03:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: Training sample assignment of raster pixels to class</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/training-sample-assignment-of-raster-pixels-to/m-p/1705907#M103440</link>
      <description>&lt;P&gt;Cell assignment depends on the geometry being converted.&amp;nbsp; Discussions are in the following links&lt;/P&gt;&lt;P&gt;&lt;A href="https://doc.esri.com/en/arcgis-pro/latest/tool-reference/conversion/how-polygon-to-raster-works.html" target="_blank"&gt;How Polygon To Raster works | ArcGIS Pro documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://doc.esri.com/en/arcgis-pro/latest/tool-reference/conversion/how-point-to-raster-works.html" target="_blank"&gt;How Point to Raster works | ArcGIS Pro documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;raster sampling by rasters would have to consider cell alignment and the snap raster&lt;/P&gt;&lt;P&gt;&lt;A href="https://doc.esri.com/en/arcgis-pro/latest/tool-reference/environment-settings/cell-alignment.html" target="_blank"&gt;Cell Alignment | ArcGIS Pro documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://doc.esri.com/en/arcgis-pro/latest/tool-reference/environment-settings/snap-raster.html" target="_blank"&gt;Snap Raster | ArcGIS Pro documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;so I would be concerned if the rasters are misaligned&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2026 13:06:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/training-sample-assignment-of-raster-pixels-to/m-p/1705907#M103440</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2026-06-03T13:06:25Z</dc:date>
    </item>
  </channel>
</rss>

