Re: [Scikit-learn-general] error when using linear SVM with AdaBoost

2014-10-06 Thread Pagliari, Roberto
Hi Matthieu, Which dataset are you referring to? Thanks From: Mathieu Blondel [mailto:math...@mblondel.org] Sent: Saturday, October 04, 2014 10:13 AM To: scikit-learn-general Subject: Re: [Scikit-learn-general] error when using linear SVM with AdaBoost On Sat, Oct 4, 2014 at 1:09 AM, Andy

Re: [Scikit-learn-general] error when using linear SVM with AdaBoost

2014-10-04 Thread Mathieu Blondel
On Sat, Oct 4, 2014 at 1:09 AM, Andy wrote: > > I'm pretty sure that is wrong, unless you use the "decision_function" > and not "predict_proba" or "predict". > Mathieu said "predict" is used. Then it is still like a (very old > school) neural network with a thresholding layer, > and not like a li

Re: [Scikit-learn-general] error when using linear SVM with AdaBoost

2014-10-03 Thread Andy
On 10/03/2014 11:10 AM, Olivier Grisel wrote: > 2014-09-27 4:51 GMT+02:00 Mathieu Blondel : >> This is because LinearSVC doesn't support sample_weight. >> >> I added a new issue for raising a more explicit error message: >> https://github.com/scikit-learn/scikit-learn/issues/3711 >> >> BTW, a linea

Re: [Scikit-learn-general] error when using linear SVM with AdaBoost

2014-10-03 Thread Olivier Grisel
2014-10-03 13:55 GMT+02:00 Mathieu Blondel : > If you want to use the exponential loss (the loss used by AdaBoost), you can > train a (single) linear model which minimizes it directly. The main point I > want to make is that a LinearSVC is not a good choice of weak learner. Alright. -- Olivier h

Re: [Scikit-learn-general] error when using linear SVM with AdaBoost

2014-10-03 Thread Mathieu Blondel
If you want to use the exponential loss (the loss used by AdaBoost), you can train a (single) linear model which minimizes it directly. The main point I want to make is that a LinearSVC is not a good choice of weak learner. M. On Fri, Oct 3, 2014 at 6:10 PM, Olivier Grisel wrote: > 2014-09-27 4

Re: [Scikit-learn-general] error when using linear SVM with AdaBoost

2014-10-03 Thread Olivier Grisel
2014-09-27 4:51 GMT+02:00 Mathieu Blondel : > This is because LinearSVC doesn't support sample_weight. > > I added a new issue for raising a more explicit error message: > https://github.com/scikit-learn/scikit-learn/issues/3711 > > BTW, a linear combination of linear models is a linear model itsel

Re: [Scikit-learn-general] error when using linear SVM with AdaBoost

2014-09-27 Thread Mathieu Blondel
Since LinearSVC doesn't have predict_proba, one must use algorithm="SAMME", the original AdaBoost which uses the output of "predict". This is not exactly a linear combination because of the sign function but still a linear SVM isn't really what I would use with Adaboost. And it doesn't seem to impr

Re: [Scikit-learn-general] error when using linear SVM with AdaBoost

2014-09-26 Thread Andy
On 09/27/2014 04:51 AM, Mathieu Blondel wrote: > This is because LinearSVC doesn't support sample_weight. > > I added a new issue for raising a more explicit error message: > https://github.com/scikit-learn/scikit-learn/issues/3711 > > BTW, a linear combination of linear models is a linear model it

Re: [Scikit-learn-general] error when using linear SVM with AdaBoost

2014-09-26 Thread Mathieu Blondel
This is because LinearSVC doesn't support sample_weight. I added a new issue for raising a more explicit error message: https://github.com/scikit-learn/scikit-learn/issues/3711 BTW, a linear combination of linear models is a linear model itself. So you can't learn a better model than a LinearSVC(

[Scikit-learn-general] error when using linear SVM with AdaBoost

2014-09-26 Thread Pagliari, Roberto
I'm trying to run AdaBoost with linear SVM and got this error: TypeError: fit() got an unexpected keyword argument 'sample_weight' The code looks like this: clf = AdaBoostClassifier(svm.LinearSVC(), n_estimators=args.ada_estimators, algorithm='SAMME')