bugGNU Octave - Bugs: bug #29545, empiricalcdf eats up too much...

 
 

bug #29545: empiricalcdf eats up too much memory + alternative solution

Submitter:  Guido Walter Pettinari <coccoinomane>
Submitted:  Tue 13 Apr 2010 03:29:07 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 3.2.3 Operating System:  * Mac OS
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 14 Apr 2010 12:26:17 AM UTC, comment #1: 

This is probably not the way to handle this. Its probably better to use the lookup function, with indexing cumsum(p), directly in the discrete_cdf function and accelerate both discrete_cdf and empirical_cdf. This will also treat correctly the NaN values in the return vector.

Proposed patch attached that I pushed to savannah

D.






(file #20217)

David Bateman <dbateman>
Group Member
Tue 13 Apr 2010 03:29:07 PM UTC, original submission:  

If I issue these commands:

N = 10000;
g = normrnd(0, 1, N, 1);
emp = empirical_cdf(g, g);

all my system's memory (4GB) is taken by Octave and everything in slowed down.

This happens in general every time N is bigger than several thousands.

I wrote an alternative 'empirical_cdf' m-file which works fine and is ultra-fast compared to Octave's. I attached it to this bug report.

Cheers,

Guido

Guido Walter Pettinari <coccoinomane>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #20217:  patch.discrete_cdf added by dbateman (1KiB - application/octet-stream)
file #20212:  empirical_cdf2.m added by coccoinomane (555B - application/x-download - Alternative, faster and memory efficient empirical_cdf function)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dbateman (Updated the item)
  • -email is unavailable- added by coccoinomane (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 group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-04-15 dbateman Open/ClosedOpen Closed
    2010-04-14 dbateman Attached File- Added patch.discrete_cdf, #20217
        StatusNone Fixed
    2010-04-13 coccoinomane Attached File- Added empirical_cdf2.m, #20212

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code