help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

empirical_inv() out of memory


From: Glenn Golden
Subject: empirical_inv() out of memory
Date: Fri, 23 Jan 2004 14:10:30 -0700

Running 2.1.50: 

Is the following a reasonable out-of-memory situation? 


    1>   f = 1 - 10 .** [-1:-1/3:-6];
    2>   g = abs(rand(4e6,1)) .** 2;
    3>   empirical_inv (f, g)
    error: memory exhausted -- trying to return to prompt

Admittedly the dataset is large and the length of f (16) multiplies
the memory requirement by at least that factor, but OTOH, I have 256MB
and 512MB swap space, nothing else was running, and Octave was invoked
from a fresh start with nothing else in the workspace.

Certainly it can be worked around easily by calling empirical_inv()
with the individual elements of f. Nevertheless, it doesn't seem like
an entirely unreasonable sized problem to expect a distribution function
to handle.    

Possibly related (or not) is the following comment in discrete_inv.m
(which is called by empirical_inv.m):

  if (any (k = find ((x > 0) & (x < 1))))
    n = length (k);
    ## --FIXME--
    ## This does not work!
    inv(k) = v(sum ((ones (m, 1) * x(k)) > (s * ones (1, n))) + 1);
  endif


(This is same version (1.5) of discrete_inv.m as the top delta in the
CVS tree.)

Glenn Golden



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]