hi Federico, lasso = Lasso(fit_intercept=False) A_ = lasso.fit(X.T, B.T).coef_
should do the trick If I followed correctly. I just transposed your problem. Alex On Thu, Jun 7, 2012 at 4:05 PM, federico vaggi <[email protected]> wrote: > Hello, > > I have a fairly simple model I am trying to solve using Lasso: > > AX + B = 0 > > Where: > > A is an [nxn] matrix > X is an [nxm] matrix > and B is an [nxm] matrix > > And I am attempting to solve for A, given X and B. > > Using a pseudo-inverse, this is quite easy to solve - but I am not really > sure how to solve this using Lasso or any of the other linear solvers. Most > of the solvers available in sklearn assume that you are trying to solve a > problem of type: > > Xw - y > > Given X and y. > > Is there a way to move the problem around (ideally, a method that is > somewhat numerically robust) so that I can use the existing solvers? > > The second issue - once I've obtained the parameters from the regression, > what's the correct way to calculate the covariance matrix to obtain an > estimate of the parameters? Does the choice of linear model I've made to > estimate the parameters influence the proper methodology I should use to > estimate the covariance matrix? > > Thank you very much, > > Federico > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Scikit-learn-general mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/scikit-learn-general > ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Scikit-learn-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
