[GRASS-dev] Re: [GRASS GIS] #359: r.quantile computes incorrect values with default number of bins

GRASS GIS trac at osgeo.org
Mon Nov 10 00:01:30 EST 2008


#359: r.quantile computes incorrect values with default number of bins
----------------------+-----------------------------------------------------
  Reporter:  dylan    |       Owner:  grass-dev at lists.osgeo.org
      Type:  defect   |      Status:  new                      
  Priority:  major    |   Milestone:  6.4.0                    
 Component:  default  |     Version:  svn-develbranch6         
Resolution:           |    Keywords:  r.quantile               
  Platform:  Linux    |         Cpu:  x86-32                   
----------------------+-----------------------------------------------------
Comment (by glynn):

 Replying to [ticket:359 dylan]:
 > I noticed that when computing quantiles from a highly skewed
 distribution, incorrect values are returned with the default number of
 bins. Reducing the number of bins seems to correct the problem
 >
 > Example, based on attached raster file in GRASS ASCII format:

 [snip]

 I cannot reproduce this. I always get the second set of values regardless
 of the number of bins used:

 {{{
 $ for n in 1 2 3 4 5 6 7 8 9 10 100 1000 10000 100000 1000000 ; do
 r.quantile beam_150 quantiles=5 bins=$n > quantile.$n.txt ; done
 $ md5sum quantile.*.txt
 2486fb3ae6eca4988acf21de10636a45  quantile.1.txt
 2486fb3ae6eca4988acf21de10636a45  quantile.10.txt
 2486fb3ae6eca4988acf21de10636a45  quantile.100.txt
 2486fb3ae6eca4988acf21de10636a45  quantile.1000.txt
 2486fb3ae6eca4988acf21de10636a45  quantile.10000.txt
 2486fb3ae6eca4988acf21de10636a45  quantile.100000.txt
 2486fb3ae6eca4988acf21de10636a45  quantile.1000000.txt
 2486fb3ae6eca4988acf21de10636a45  quantile.2.txt
 2486fb3ae6eca4988acf21de10636a45  quantile.3.txt
 2486fb3ae6eca4988acf21de10636a45  quantile.4.txt
 2486fb3ae6eca4988acf21de10636a45  quantile.5.txt
 2486fb3ae6eca4988acf21de10636a45  quantile.6.txt
 2486fb3ae6eca4988acf21de10636a45  quantile.7.txt
 2486fb3ae6eca4988acf21de10636a45  quantile.8.txt
 2486fb3ae6eca4988acf21de10636a45  quantile.9.txt
 $ cat quantile.1.txt
 0:20.000000:7440.040527
 1:40.000000:7512.872559
 2:60.000000:7570.587402
 3:80.000000:7611.161133
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/359#comment:2>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list