2012/2/27 Matthias Ekman <[email protected]>:
> thanks for all the helpful remarks! That's exactly what I wanted to
> know. However I am a bit surprised by the low performance of Elastic Net
> in comparison to logit (both using L1 regularization and test/training
> on the full dataset). Am I overseeing something obvious here?
>
> acc enet: 69.0
> acc logit: 100.0
>
> iris = datasets.load_iris()
> X = iris.data
> y = iris.target
>
> idx=np.where(y!=2)[0] # select only labels 0 & 1
> X=X[idx,:]
> y=y[idx,:]
> X /= X.std(0)
>
> clf = OneVsRestClassifier(ElasticNet(alpha=0., rho=0.))
> y_pred = clf.fit(X,y).predict(X)
> print 'acc enet:',zero_one_score(y,y_pred)*100

Why alpha and rho to 0?  Usual rho is good around 0.8 and alpha should
be adjusted by grid search.

-- 
Olivier
http://twitter.com/ogrisel - http://github.com/ogrisel

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to