bugGNU Octave - Bugs: bug #44996, statistics: Appropriate results of...

 
 

bug #44996: statistics: Appropriate results of gev(c|p)df function for small values of k

Submitted by:  Rafael Laboissiere <rlaboiss>
Submitted on:  Sat 02 May 2015 10:52:10 AM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Inaccurate Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 02 May 2015 02:52:47 PM UTC, comment #2:

Yes, setting the threshold as a function of eps is a good idea. Thanks.

Rafael Laboissiere <rlaboiss>
Sat 02 May 2015 01:35:53 PM UTC, comment #1:

Thanks for diagnosing. I applied your patch, except that I wrote the threshold as a function of eps

Nir Krakauer <nir_krakauer>
Sat 02 May 2015 10:52:10 AM UTC, original submission:

When computing the cdf and pdf of the GEV distributions, in functions gevcdf and gevpdf, respectively, the parameter k appears in the denominator of a division operation. To avoid division by zero, the condition k==0 is tested and an alternative formula is used for it.

However, this test should be extended to values very close to zero. Doing some non-extensive tests, I concluded that the function returns wrong results for values of abs(k) lesser than 1e-11. The most appropriate limit value should be more carefully chosen, though.

This problem was evidenced in unit tests of the gevcdf and gevpdf functions. In one case, we have:

In my system (Octave 4.0 on Debian i386), the fourth element of k is different from zero (it is equal 3.4694e-18) and the result of gevcdf is clearly wrong, and the unit test fails.

Patch attached.

Rafael Laboissiere <rlaboiss>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by nir_krakauer (Posted a comment)
  • -unavailable- added by rlaboiss (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 02 May 2015 04:10:28 PM UTCcarandraugStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Sat 02 May 2015 10:52:10 AM UTCrlaboissAttached File-=>Added small-k-in-gev-functions.diff, #33876

    Back to the top


    Powered by Savane 3.1-cleanup1