8

I need Lasso/L1 constrained Regression Library in C. AFAIK, NAG does not support it. R has a package to do it but I need to do it in C. Any idea?

Foo Bah
  • 25,660
  • 5
  • 55
  • 79
Pratik Poddar
  • 1,353
  • 3
  • 18
  • 36

3 Answers3

2

You could embed R in your application.

Michael Dillon
  • 31,973
  • 6
  • 70
  • 106
2

Coding l1 stuff yourself should not be too bad. Both ftp://ftp.math.ucla.edu/pub/camreport/cam08-37.pdf and ftp://ftp.math.ucla.edu/pub/camreport/cam08-29.pdf are easy to implement.

If you can use C++ this library might already have what you want: http://www.di.ens.fr/willow/SPAMS/index.html

dranxo
  • 3,348
  • 4
  • 35
  • 48
1

Thanks. I wrote my own C function and it worked well.

Pratik Poddar
  • 1,353
  • 3
  • 18
  • 36
  • Can you provide your solution ? – dwbrito Jun 30 '13 at 21:42
  • @dwbrito Here's the implentation in C, in bbr package. All code & executables are hosted at Google Code project page. Main page http://www.bayesianregression.org/ and project page http://code.google.com/p/bbrbmr/downloads/list – ekta Jan 16 '14 at 18:50