Conflicting messages, no, there is no explicit ElasticNetClassifier, but
Manoj's proposition creates one:

Concerning Manoj's point 2), you may also want to trying weighting in a
different way, by centering the target variable y, i.e. if y is in {-1, 1},
then do y <- y - y.mean(). This can help with the inevitable class
imbalance in the OvR setting.

Michael


On Tue, Jul 22, 2014 at 4:56 PM, Vlad Niculae <[email protected]> wrote:

> Hi,
>
> The SGDClassifier supports elastic net regularization. You can make it
> solve the SVM loss function or the logistic loss function by changing
> the `loss=` parameter.
>
> Hope this helps,
> Vlad
>
> On Tue, Jul 22, 2014 at 4:17 PM, Sheila the angel
> <[email protected]> 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
> > [email protected]
> > 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
> [email protected]
> 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to