<?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 How does the tool Reclassify for Quantile work? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/how-does-the-tool-reclassify-for-quantile-work/m-p/165390#M7472</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;reclassify‌ spatial analyst tools quantiles&lt;/P&gt;&lt;P&gt;This is a question to both ArcGIS desktop or ArcGIS Pro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to run a Reclassify to 10 classes defined by Quantile and assign output values 1,2,3...10. This process will run for hundreds of raster file. So I have to automate this process with either Python or Model Builder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, I tried raster iteration in Model Builder. The problem is that Reclassify only records the thresholds defined by Quantile from the first file. It doesn't update those thresholds by re-calculate Quantile for each file. Essentially, the model runs for a fix thresholds calculated from the first raster. I export this model to Python and it looks like below and you can see the threshold is hard-coded in this tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.gp.Reclassify_sa(myraster, "VALUE", "0.001000 0.013032 1;0.013032 0.047890 2;0.047890 0.100943 3;0.100943 0.169297 4;0.169297 0.247985 5;0.247985 0.330505 6;0.330505 0.418255 7;0.418255 0.844142 8;0.844142 2.620020 9;2.620020 1000.000122 10", Reclass_myraster, "DATA")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, I tried Python using statistical percentile calculation. Then, I found it is different from Reclassify tool. The following table compares the counts for each class in the two outputs from the two different approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My raster data is highly skewed to low values. I actually like the output from the Reclassify tool, although theoretically the output is not classified by 10 classes in Quantile (as is Python output). I hope to find out how this can be coded in Python, so I can run for hundreds raster files. so two questions:&lt;/P&gt;&lt;P&gt;1. Is there a reference explaining how the Reclassify tool using Quantile works for highly skewed data?&lt;/P&gt;&lt;P&gt;2. Is there a way I can run Reclassify tool with new threshold from Quantile calculated for each raster?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE style="width: 416px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="width: 37px;"&gt;Value&lt;/TD&gt;&lt;TD style="width: 137px;"&gt;Count (from reclassify tool)&lt;/TD&gt;&lt;TH style="width: 454px; background-color: #efefef;"&gt;&lt;P&gt;Count (from percentile in Python)&lt;/P&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 37px;"&gt;1&lt;/TD&gt;&lt;TD style="width: 137px;"&gt;0&lt;/TD&gt;&lt;TH style="width: 454px; background-color: #efefef;"&gt;&lt;P&gt;3511&lt;/P&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 37px;"&gt;2&lt;/TD&gt;&lt;TD style="width: 137px;"&gt;32683&lt;/TD&gt;&lt;TD style="width: 454px;"&gt;3510&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 37px;"&gt;3&lt;/TD&gt;&lt;TD style="width: 137px;"&gt;581&lt;/TD&gt;&lt;TD style="width: 454px;"&gt;3510&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 37px;"&gt;4&lt;/TD&gt;&lt;TD style="width: 137px;"&gt;448&lt;/TD&gt;&lt;TD style="width: 454px;"&gt;3510&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 37px;"&gt;5&lt;/TD&gt;&lt;TD style="width: 137px;"&gt;375&lt;/TD&gt;&lt;TD style="width: 454px;"&gt;3510&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 37px;"&gt;6&lt;/TD&gt;&lt;TD style="width: 137px;"&gt;292&lt;/TD&gt;&lt;TD style="width: 454px;"&gt;3510&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 37px;"&gt;7&lt;/TD&gt;&lt;TD style="width: 137px;"&gt;199&lt;/TD&gt;&lt;TD style="width: 454px;"&gt;3510&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 37px;"&gt;8&lt;/TD&gt;&lt;TD style="width: 137px;"&gt;183&lt;/TD&gt;&lt;TD style="width: 454px;"&gt;3510&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 37px;"&gt;9&lt;/TD&gt;&lt;TD style="width: 137px;"&gt;170&lt;/TD&gt;&lt;TD style="width: 454px;"&gt;3510&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 37px;"&gt;10&lt;/TD&gt;&lt;TD style="width: 137px;"&gt;170&lt;/TD&gt;&lt;TD style="width: 454px;"&gt;3510&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 May 2019 17:25:48 GMT</pubDate>
    <dc:creator>QianYu</dc:creator>
    <dc:date>2019-05-08T17:25:48Z</dc:date>
    <item>
      <title>How does the tool Reclassify for Quantile work?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-does-the-tool-reclassify-for-quantile-work/m-p/165390#M7472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;reclassify‌ spatial analyst tools quantiles&lt;/P&gt;&lt;P&gt;This is a question to both ArcGIS desktop or ArcGIS Pro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to run a Reclassify to 10 classes defined by Quantile and assign output values 1,2,3...10. This process will run for hundreds of raster file. So I have to automate this process with either Python or Model Builder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, I tried raster iteration in Model Builder. The problem is that Reclassify only records the thresholds defined by Quantile from the first file. It doesn't update those thresholds by re-calculate Quantile for each file. Essentially, the model runs for a fix thresholds calculated from the first raster. I export this model to Python and it looks like below and you can see the threshold is hard-coded in this tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.gp.Reclassify_sa(myraster, "VALUE", "0.001000 0.013032 1;0.013032 0.047890 2;0.047890 0.100943 3;0.100943 0.169297 4;0.169297 0.247985 5;0.247985 0.330505 6;0.330505 0.418255 7;0.418255 0.844142 8;0.844142 2.620020 9;2.620020 1000.000122 10", Reclass_myraster, "DATA")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, I tried Python using statistical percentile calculation. Then, I found it is different from Reclassify tool. The following table compares the counts for each class in the two outputs from the two different approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My raster data is highly skewed to low values. I actually like the output from the Reclassify tool, although theoretically the output is not classified by 10 classes in Quantile (as is Python output). I hope to find out how this can be coded in Python, so I can run for hundreds raster files. so two questions:&lt;/P&gt;&lt;P&gt;1. Is there a reference explaining how the Reclassify tool using Quantile works for highly skewed data?&lt;/P&gt;&lt;P&gt;2. Is there a way I can run Reclassify tool with new threshold from Quantile calculated for each raster?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE style="width: 416px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="width: 37px;"&gt;Value&lt;/TD&gt;&lt;TD style="width: 137px;"&gt;Count (from reclassify tool)&lt;/TD&gt;&lt;TH style="width: 454px; background-color: #efefef;"&gt;&lt;P&gt;Count (from percentile in Python)&lt;/P&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 37px;"&gt;1&lt;/TD&gt;&lt;TD style="width: 137px;"&gt;0&lt;/TD&gt;&lt;TH style="width: 454px; background-color: #efefef;"&gt;&lt;P&gt;3511&lt;/P&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 37px;"&gt;2&lt;/TD&gt;&lt;TD style="width: 137px;"&gt;32683&lt;/TD&gt;&lt;TD style="width: 454px;"&gt;3510&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 37px;"&gt;3&lt;/TD&gt;&lt;TD style="width: 137px;"&gt;581&lt;/TD&gt;&lt;TD style="width: 454px;"&gt;3510&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 37px;"&gt;4&lt;/TD&gt;&lt;TD style="width: 137px;"&gt;448&lt;/TD&gt;&lt;TD style="width: 454px;"&gt;3510&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 37px;"&gt;5&lt;/TD&gt;&lt;TD style="width: 137px;"&gt;375&lt;/TD&gt;&lt;TD style="width: 454px;"&gt;3510&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 37px;"&gt;6&lt;/TD&gt;&lt;TD style="width: 137px;"&gt;292&lt;/TD&gt;&lt;TD style="width: 454px;"&gt;3510&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 37px;"&gt;7&lt;/TD&gt;&lt;TD style="width: 137px;"&gt;199&lt;/TD&gt;&lt;TD style="width: 454px;"&gt;3510&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 37px;"&gt;8&lt;/TD&gt;&lt;TD style="width: 137px;"&gt;183&lt;/TD&gt;&lt;TD style="width: 454px;"&gt;3510&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 37px;"&gt;9&lt;/TD&gt;&lt;TD style="width: 137px;"&gt;170&lt;/TD&gt;&lt;TD style="width: 454px;"&gt;3510&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="width: 37px;"&gt;10&lt;/TD&gt;&lt;TD style="width: 137px;"&gt;170&lt;/TD&gt;&lt;TD style="width: 454px;"&gt;3510&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 May 2019 17:25:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-does-the-tool-reclassify-for-quantile-work/m-p/165390#M7472</guid>
      <dc:creator>QianYu</dc:creator>
      <dc:date>2019-05-08T17:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: How does the tool Reclassify for Quantile work?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-does-the-tool-reclassify-for-quantile-work/m-p/165391#M7473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suggest trying the &lt;A href="https://pro.arcgis.com/en/pro-app/tool-reference/3d-analyst/slice.htm"&gt;Slice&amp;nbsp;&lt;/A&gt;tool&amp;nbsp;with the EQUAL_AREA option. This will split your data by its input statistics.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Jun 2019 17:50:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-does-the-tool-reclassify-for-quantile-work/m-p/165391#M7473</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2019-06-30T17:50:10Z</dc:date>
    </item>
  </channel>
</rss>

