hi Lasso and LassoLars support matrices. If you have too many zeros use a smaller alpha or better use LassoCV or LassoLarsCV to set the alpha by cross-validation. The LassoCV and LassoLarsCV do not support matrices though. So use a for loop over the columns of Y.
HTH Alex On Wed, Aug 7, 2013 at 11:34 PM, Shishir Pandey <shishir...@gmail.com> wrote: > Hi > > I would like to solve the standard Lasso optimization: > > (1 / (2 * n_samples)) * ||Y - XW||^2_2 + alpha * ||W||_1 > > > Only difference being that I want to take Y to be a matrix. This would > mean that W is also a matrix. Is it a good idea to use the lasso module > written in scikit-learn? > > I have tried it on a number of matrices generated randomly, the > optimization forces entire columns to go to zero. The resulting matrix W > will have many zero columns. > > > Thanks. > > -- > sp > > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite! > It's a free troubleshooting tool designed for production. > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk > _______________________________________________ > Scikit-learn-general mailing list > Scikit-learn-general@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/scikit-learn-general ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk _______________________________________________ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general