Hi.
You can not use the ElasticNet regressor for classification.
You can, however, use the SGDClassifier, which also supports elastic net regularization.

Cheers,
Andy

On 07/22/2014 03:17 PM, Sheila the angel wrote:

Hello All,

Is it possible to perform classification using linear models such as ElasticNet?

I tried the following -

from sklearn.linear_model import ElasticNet

iris = datasets.load_iris()

X= iris.data

y= iris.target


clf= ElasticNet()

clf.fit(X,y).predict(X[0])


Which gives output value in decimal points.

Any suggestion or link to an example will be very helpful.



Thanks

--

Sheila





------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds


_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to