bugPSPP - Bugs: bug #47139, EXAMINE plot histogram does wrong...

 
 

bug #47139: EXAMINE plot histogram does wrong binning

Submitter:  Friedrich Beckmann <beckmanf>
Submitted:  Sun 14 Feb 2016 12:19:36 PM UTC
 
Category:  Numerical Errors Severity:  5 - Average
Status:  Fixed Assigned to:  None
Open/Closed:  Closed Release:  None
Effort:  0.00
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

( Jump to the original submission )

Thu 25 Feb 2016 10:44:48 AM UTC, comment #8: 

The problem regarding the COMMA as DECIMAL point is continued in bug #47253

Friedrich Beckmann <beckmanf>
Project Member
Tue 16 Feb 2016 09:50:07 AM UTC, comment #7: 

After the proposal from John I changed the fix. Now just a bin is added at the upper limit if the upper limit of the upper bin is equal to the max values. The commit is:

Original fix: ca4012bcf0f8790ceb8539b55bbc29
Revert commit: d2b2641dcadcdceede8be06df

New fix: a0b0ffb38287336c2ebdc62995

Friedrich Beckmann <beckmanf>
Project Member
Mon 15 Feb 2016 06:52:03 PM UTC, comment #6: 

I fixed this problem with commit

http://git.savannah.gnu.org/cgit/pspp.git/commit/?id=ca4012bcf0f8790ceb8539b55bbc296d0802d5d7

Now all cases are considered in the histogram. The problem with the comma parsing is not addressed with this patch.

Friedrich Beckmann <beckmanf>
Project Member
Mon 15 Feb 2016 06:24:09 AM UTC, comment #5: 

It seems you are right.  (It is always confusing when two bugs interact).

I will have a look  to see why the last bin is omitted.

John Darrington <jmd>
Project Administrator
Sun 14 Feb 2016 09:23:23 PM UTC, comment #4: 

Hi John,

this are two bugs which are not related. Your patch fixes the parsing of the comma numbers. There is some simple syntax error and whitespace in your patch, but once that is changed it works.

My problem is that the cases with value 7 are not considered in the histogram. The reason is that the gsl_histogram excludes the upper limit value of the last bin. The last bin is [6,7). If you count the entries then the case with 7 is missing.

Friedrich

Friedrich Beckmann <beckmanf>
Project Member
Sun 14 Feb 2016 08:13:58 PM UTC, comment #3: 

I think the attached patch should fix this issue, but I'd like Ben to have a look before I push it.

Fritz, can you try it to see if it makes a difference for you?

(file #36337)

John Darrington <jmd>
Project Administrator
Sun 14 Feb 2016 08:12:37 PM UTC, comment #2: 

Hi John,

the problem is also visible in the current git version with at commit 9bf0d33865adacf. You can see the problem also with integer numbers.

DATA LIST LIST /A *.
BEGIN DATA
1
1
1
2
2
3
3
3
3
4
4
4
5
5
6
7
END DATA

LIST /FORMAT=NUMBERED.

EXAMINE
        Variables = A
        /plot = histogram
        .

This produces the same buggy histogram where the last bin is wrong (empty).

Friedrich Beckmann <beckmanf>
Project Member
Sun 14 Feb 2016 01:59:19 PM UTC, comment #1: 

I don't get the same results as you.

But I do notice something odd to do with the parsing.

It seems that it the comma is not being interpreted as a decimal separator (as it should in a German locale).

Can you try replacing the commas with dots, and adding the command
SET DECIMAL=DOT. at the top.

John Darrington <jmd>
Project Administrator
Sun 14 Feb 2016 12:19:36 PM UTC, original submission:  

The following code produces a wrong histogram plot.

DATA LIST LIST /A *.
BEGIN DATA
1
1
1
2
2
3
3
3,5
3
4
4
4
5
5
6,5
7
END DATA


LIST /FORMAT=NUMBERED.

EXAMINE
        Variables = A
        /plot = histogram
        .

The produced plot has an empty bin in the range (6,7) and three entries in the (5,6) bin.
Expected: (5,6) bin should have 2 entries and the (6,7) bin should have two entries.

I have noticed this problem on the macports version 0.9.0-g03a7b9.

Friedrich

Friedrich Beckmann <beckmanf>
Project Member

 

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

Attach Files:
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jmd (Posted a comment)
  • -email is unavailable- added by beckmanf (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-02-15 beckmanf CategoryInternationalization/Localization Numerical Errors
        StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2016-02-14 jmd Attached File- Added 0001-DATA-LIST-Do-not-use-comma-as-a-delimiter-if-it-is-t.patch, #36337
        CategoryNumerical Errors Internationalization/Localization
    2016-02-14 beckmanf Attached File- Added histogram-bug.JPG, #36333

    Back to the top


    Powered by Savane 3.9