Hi everyone,

I am still trying to understand ElasticNet. Here's my description (from a
previous thread) of the kind of problem I am trying to solve:

On Mon, Sep 17, 2012 at 9:56 AM, Ariel Rokem <[email protected]> wrote:

> I am using the sklearn.linear_model.ElasticNet class to fit some data. The
> structure of the data is y = Xw, and I am trying to solve for w where
> y.shape is (150,) and X.shape is (150,150), with a non-negativity
> constraint. Both y and each column of X is mean-removed. Some of the
> columns of X are quite correlated with each other. I have been playing
> around a bit with different settings of inputs to the initialization of
> ElasticNet.


Here's what I am currently stuck on: if I set the alpha input to ElasticNet
to be 0, this should mean that no regularization penalty is applied,
correct? According to my understanding, this would imply that the fit is
now optimizing purely on the least squared error. Given 150 data points and
150 independent regressors, it should fit the data perfectly, leaving no
residuals. However, this doesn't actually happen with the ElasticNet and
alpha=0. I get a fit that is somewhat different from the original data.
Initially, I suspected that this has to do with the non-negativity
constraint I applied, so I removed that. Then, I was wondering whether it
might have to do with the correlation among my regressors, so I
tried linear_model.LinearRegression. This fits all the way, leaving no
residuals. How should I then understand what ElasticNet is doing?

Thanks a lot!

Ariel
------------------------------------------------------------------------------
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

Reply via email to