Rank: 483 based on 225 downloads (last 30 days) and 6 files submitted
photo

Stephen Becker

E-mail
Company/University
University of Paris 6

Personal Profile:

I'm a postdoc at UPMC in Paris. http://ugcs.caltech.edu/~srbecker

Professional Interests:
optimization, signal processing

 

Watch this Author's files

 

Files Posted by Stephen View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
18 Jan 2013 Screenshot LBFGSB (L-BFGS-B) mex wrapper Mex wrapper for lbfgsb v3.0 fortan library. L-bfgs-b solves box-constrained optimization. Author: Stephen Becker optimization, constrained optimizat..., quasinewton, bfgs, bound constraints, nnls 72 37
  • 5.0
5.0 | 9 ratings
12 Dec 2012 Screenshot CoSaMP and OMP for sparse recovery Orthogonal Matching Pursuit (OMP) and Compressive Sampling Matched Pursuit (CoSaMP). Author: Stephen Becker omp, cosamp, compressed sensing, compressive sampling, sparse, sparse recovery 114 14
  • 4.42857
4.4 | 7 ratings
23 Jul 2012 mex interface for bound constrained optimization via ASA ASA solves bound constrained problems; the user provides routines to calculate the function and grad Author: Stephen Becker bound constrained, optimization, constrained optimizat..., activeset, cg, nonlinear cg 18 0
29 Feb 2008 idctt type II Inverse DCT (i.e. type III DCT) Author: Stephen Becker spectral analysis, idct dct fft persiste... 6 0
26 Feb 2008 dctt type II DCT, improvement to matlab's dct Author: Stephen Becker spectral analysis, dct fft persistent sa... 9 0
Comments and Ratings by Stephen View all
Updated File Comments Rating
03 Jul 2014 LBFGSB (L-BFGS-B) mex wrapper Mex wrapper for lbfgsb v3.0 fortan library. L-bfgs-b solves box-constrained optimization. Author: Stephen Becker

Hi Alexandre,
I've never seen that error either. Maybe ask the mathworks help about it.
-Stephen

05 Aug 2013 LBFGSB (L-BFGS-B) mex wrapper Mex wrapper for lbfgsb v3.0 fortan library. L-bfgs-b solves box-constrained optimization. Author: Stephen Becker

Hi Roland,
That's great it works! If you wouldn't mind, can you post detailed instructions here? I think many others would find them useful.

You're right about the typo in the nrhs. I'll fix that in the next update.

Right now, the gradient is necessary. The Python and R versions use large packages to get around this. They might have a finite-differences gradient approximation mode, but I suspect they are really doing automatic differentiation (the good news is that this is the exact gradient, no approximation. The bad news is that it can be sometimes slow). There are automatic differentiation packages for Matlab, but none that seem to be very "mature". So you could try some of those, but if you can work out an explicit function to compute the gradient, that is usually the simplest (no automatic differentiation packages to get working) and the fastest for computation.
Best, Stephen

24 Jul 2013 LBFGSB (L-BFGS-B) mex wrapper Mex wrapper for lbfgsb v3.0 fortan library. L-bfgs-b solves box-constrained optimization. Author: Stephen Becker

Hi Roland,
I think that's with trying the f2c'd version of the code. It might be that your C compiler is stricter than the f2c code. Maybe you can tell the compiler to allow a newer standard? In gcc, it would be something like -std=gnu99 or -ansi. You can probably look up the equivalent for MSVC.
Or, if you can get a fortran compiler, then use the original fortran code and don't mess with the f2c version.
Either way, I'm afraid I can't help much because I work with a Windows computer. Judging from the other comments here, it is quite difficult to get this code to work with 64 it Windows. We really need a pure C version of the code; if you want to do this (you can use the f2c version as a base), please let me know!
Best,
Stephen

23 Jul 2013 CoSaMP and OMP for sparse recovery Orthogonal Matching Pursuit (OMP) and Compressive Sampling Matched Pursuit (CoSaMP). Author: Stephen Becker

Israa, I'm not exactly sure what you want to do, but if you wish to work with 2D images, then use vectorize (e.g. use vec = @(x) x(:) ) and reshape operators, so that the code only sees vectors. If done right, it will work just fine. Hope that helps a bit.
-Stephen

30 Jun 2013 LBFGSB (L-BFGS-B) mex wrapper Mex wrapper for lbfgsb v3.0 fortan library. L-bfgs-b solves box-constrained optimization. Author: Stephen Becker

Hi Xin,
You are using the f2c version I included, so this adds more complication. The problem is almost surely that your BLAS requires integers of different lengths. So try two things:
First, define _BLAS64_ when you compile. You can do this by adding -D_BLAS64_ to the mex compilation command. Hopefully this will fix it.
Second, try a different BLAS. You can install another version (e.g. ATLAS) and use that. If there are still problems, use the netlib source code (for CBLAS) and link with this source; this way your compiler will give you errors if there are incompatibilities and they will be easy to fix.
Best, Stephen

Comments and Ratings on Stephen's Files View all
Updated File Comment by Comments Rating
15 Jul 2014 LBFGSB (L-BFGS-B) mex wrapper Mex wrapper for lbfgsb v3.0 fortan library. L-bfgs-b solves box-constrained optimization. Author: Stephen Becker Alexandre

Problem sloved. It seems that Matlab R2014a does not allow to compile Fortran and C in a single MEX call. I believe that it allowed to link the files automatically.

I had to compile the Fortran code to .o objects and link them to the .c files manually.

15 Jul 2014 LBFGSB (L-BFGS-B) mex wrapper Mex wrapper for lbfgsb v3.0 fortan library. L-bfgs-b solves box-constrained optimization. Author: Stephen Becker Alexandre

Hi Stephen,

I managed to compile the Fortran part by splitting into 2 MEX calls:

mex Lbfgsb.3.0/lbfgsb.f Lbfgsb.3.0/linpack.f Lbfgsb.3.0/timer.f -lm -lmwblas CFLAGS="\$CFLAGS -O3"FC="gfortran"

mex -v lbfgsb_wrapper.c -largeArrayDims -UDEBUG ;

The Fortran part is fine, but not the C compilation. I get the following error message:

Error using mex
/tmp/mex_29407351995475_5199/lbfgsb_wrapper.o: In function `mexFunction':
lbfgsb_wrapper.c:(.text+0x738): undefined reference to `setulb_'
collect2: error: ld returned 1 exit status

I have tried to play with the -DNOUNDERSCORE -UUPPERCASE_FORTRAN flags but none of them seem to help.

How can I fix this issue?

Thank you very much

03 Jul 2014 LBFGSB (L-BFGS-B) mex wrapper Mex wrapper for lbfgsb v3.0 fortan library. L-bfgs-b solves box-constrained optimization. Author: Stephen Becker Becker, Stephen

Hi Alexandre,
I've never seen that error either. Maybe ask the mathworks help about it.
-Stephen

03 Jul 2014 LBFGSB (L-BFGS-B) mex wrapper Mex wrapper for lbfgsb v3.0 fortan library. L-bfgs-b solves box-constrained optimization. Author: Stephen Becker Alexandre

I have tried to compile it under Linux Mint 17, with Matlab 2014a. I got the following error message:

Error using mex
Cannot compile both C and FORTRAN source files in a single call to MEX.

Error in compile_mex (line 61)
mex -v lbfgsb_wrapper.c -largeArrayDims -UDEBUG ...

I've tried to find out about this error but it is nowhere to be found, as if it is an issue related to Matlab 2014 only.

Any suggestion?
Cheers

05 May 2014 CoSaMP and OMP for sparse recovery Orthogonal Matching Pursuit (OMP) and Compressive Sampling Matched Pursuit (CoSaMP). Author: Stephen Becker Yang

Thanks for this source code

Contact us