Re: [OctDev] Fix to improve memory efficiency of regress function in statistics-1.0.10

2011-02-13 Thread Arno Onken
On 02/13/2011 02:40 PM, Nir Krakauer wrote: > I found that the regress function runs out of memory when given > moderately large problems, such as > > y = randn(1E5, 1); > X = randn(1E5, 2); > [b, bint, r, rint, stats] = regress(y, X); I applied your changes. Thanks. Arno

Re: [OctDev] Fix to improve memory efficiency of regress function in statistics-1.0.10

2011-02-13 Thread Nir Krakauer
diff --suppress-common-lines -d --speed-large-files --suppress-blank-empty /usr/share/octave/packages/3.2/statistics-1.0.10/regress.m regress.m 1a2 > ## Nir Krakauer, 2011: Modified to avoid computing X * pinv(X), which will > lead to running out of memory when the number of data points is aroun

Re: [OctDev] Fix to improve memory efficiency of regress function in statistics-1.0.10

2011-02-13 Thread Søren Hauberg
søn, 13 02 2011 kl. 14:40 -0500, skrev Nir Krakauer: > I found that the regress function runs out of memory when given > moderately large problems, such as > > y = randn(1E5, 1); > X = randn(1E5, 2); > [b, bint, r, rint, stats] = regress(y, X); > > This is because a large (1E5*1E5) intermediate m

[OctDev] Fix to improve memory efficiency of regress function in statistics-1.0.10

2011-02-13 Thread Nir Krakauer
I found that the regress function runs out of memory when given moderately large problems, such as y = randn(1E5, 1); X = randn(1E5, 2); [b, bint, r, rint, stats] = regress(y, X); This is because a large (1E5*1E5) intermediate matrix is computed. Slight modification of the code, as given below, a