bugGNU Octave - Bugs: bug #44987, statistics: hist3 should pad...

 
 

bug #44987: statistics: hist3 should pad output when called with centers larger than data

Submitted by:  ederag <ederag>
Submitted on:  Fri 01 May 2015 09:17:23 PM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: otherOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Thu 13 Aug 2015 01:59:42 AM UTC, comment #2:

I can confirm this bug and that this is a regression caused by http://hg.code.sf.net/p/octave/statistics/rev/51b09dcd0aa7 by the change "replaced 'sparse' with 'accumarray', which avoids the superfluous creation and conversion of sparse matrices".

Replacing the use of accumarray back to sparse, fixes the issue. (pushed fix http://hg.code.sf.net/p/octave/statistics/rev/4ce359e8d1de )

A simple example, using "Edges" (which is my use case and was working fine 2 years ago):

The error comes surface but that's because hist3 is passing the wrong data to it. This can be shown by getting the data instead of displaying. Note how the size of the output changes with random data, even though the bin edges are defined always the same:

Carnë Draug <carandraug>
Project Member
Tue 02 Jun 2015 04:52:39 PM UTC, comment #1:

Retagging release from 4.0.0-rc4 to 4.0.0.

John W. Eaton <jwe>
Project Administrator
Fri 01 May 2015 09:17:23 PM UTC, original submission:

With statistics-1.2.4 package, when hist3 is called with centers higher than any of the given data, the N output is not padded with 0 as it should.
For instance:

The solution is to add a size argument to accumarray. Patch attached.

ederag <ederag>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #33863:  hist3.m.patch added by ederag (644B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by carandraug (Arno Onken - maintainer of the statistics package)
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by ederag (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 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 13 Aug 2015 01:59:42 AM UTCcarandraugStatusNone=>Fixed
      Open/ClosedOpen=>Closed
      Release4.0.0=>other
      Summaryhist3 should pad output when called with centers larger than data=>statistics: hist3 should pad output when called with centers larger than data
    Tue 02 Jun 2015 11:20:26 PM UTCcarandraugCarbon-Copy-=>Added -unavailable-
    Tue 02 Jun 2015 04:52:39 PM UTCjweRelease4.0.0-rc4=>4.0.0
    Fri 01 May 2015 09:17:23 PM UTCederagAttached File-=>Added hist3.m.patch, #33863

    Back to the top


    Powered by Savane 3.1-cleanup1